diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py index 8e0b74705690..30274cc6e9dd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py index 8e0b74705690..30274cc6e9dd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py index 4f1715fdf232..f586a342354a 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/completion_service/async_client.py @@ -409,7 +409,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CompletionServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py index 344527db15cf..071f5d04fddc 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/document_service/async_client.py @@ -1138,7 +1138,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DocumentServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py index 63bb402cc6e3..809462d83ac1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/schema_service/async_client.py @@ -929,7 +929,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SchemaServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py index 95c695542945..683b8f345e08 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/search_service/async_client.py @@ -427,7 +427,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SearchServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py index b9c824f700a7..14f44e5fd3e0 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1/services/user_event_service/async_client.py @@ -668,7 +668,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "UserEventServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py index 8e0b74705690..30274cc6e9dd 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py index 3bf044a19c6d..118d59152af1 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/completion_service/async_client.py @@ -409,7 +409,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CompletionServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py index e66c9a467cc3..4ff551fac2ee 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/document_service/async_client.py @@ -1141,7 +1141,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DocumentServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/async_client.py index 2c6a17661c40..38ced530b58d 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/recommendation_service/async_client.py @@ -417,7 +417,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "RecommendationServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py index 110c0aa690c4..f0472f685784 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/schema_service/async_client.py @@ -929,7 +929,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SchemaServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py index f6d1beb1d01e..bbdc698e60ef 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/search_service/async_client.py @@ -427,7 +427,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SearchServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py index e9b0650e4dcd..1541b6cafaf3 100644 --- a/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py +++ b/packages/google-cloud-discoveryengine/google/cloud/discoveryengine_v1beta/services/user_event_service/async_client.py @@ -668,7 +668,7 @@ async def get_operation( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "UserEventServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-discoveryengine/noxfile.py b/packages/google-cloud-discoveryengine/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-discoveryengine/noxfile.py +++ b/packages/google-cloud-discoveryengine/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-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json index 9ca8b77784e3..2b48f6d6b5b2 100644 --- a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json +++ b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-discoveryengine", - "version": "0.9.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json index 8f2adbd15fa7..24978a914517 100644 --- a/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json +++ b/packages/google-cloud-discoveryengine/samples/generated_samples/snippet_metadata_google.cloud.discoveryengine.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-discoveryengine", - "version": "0.9.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_document_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_document_service.py index b5a99ce9d8cf..20abde5d0d60 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_document_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_document_service.py @@ -769,13 +769,7 @@ def test_get_document(request_type, transport: str = "grpc"): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) response = client.get_document(request) @@ -1403,9 +1397,11 @@ async def test_list_documents_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_documents(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 @@ -1436,13 +1432,7 @@ def test_create_document(request_type, transport: str = "grpc"): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) response = client.create_document(request) @@ -1755,13 +1745,7 @@ def test_update_document(request_type, transport: str = "grpc"): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) response = client.update_document(request) @@ -2432,13 +2416,7 @@ def test_get_document_rest(request_type): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) # Wrap the value into a proper Response obj @@ -3079,13 +3057,7 @@ def test_create_document_rest(request_type): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) # Wrap the value into a proper Response obj @@ -3441,13 +3413,7 @@ def test_update_document_rest(request_type): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_schema_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_schema_service.py index 02b7127f5ff8..f77c09a45085 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_schema_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_schema_service.py @@ -738,13 +738,7 @@ def test_get_schema(request_type, transport: str = "grpc"): # Designate an appropriate return value for the call. call.return_value = schema.Schema( name="name_value", - struct_schema=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_schema="json_schema_value", ) response = client.get_schema(request) @@ -1363,9 +1357,11 @@ async def test_list_schemas_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_schemas(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 @@ -2059,13 +2055,7 @@ def test_get_schema_rest(request_type): # Designate an appropriate value for the returned response. return_value = schema.Schema( name="name_value", - struct_schema=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_schema="json_schema_value", ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_search_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_search_service.py index 1e370f38c6dc..04a8bb63d0eb 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_search_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1/test_search_service.py @@ -1050,6 +1050,8 @@ async def test_search_async_pages(): RuntimeError, ) pages = [] + # 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 (await client.search(request={})).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_document_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_document_service.py index 4f7d62ae23a0..0c33eb530990 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_document_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_document_service.py @@ -769,13 +769,7 @@ def test_get_document(request_type, transport: str = "grpc"): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) response = client.get_document(request) @@ -1403,9 +1397,11 @@ async def test_list_documents_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_documents(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 @@ -1436,13 +1432,7 @@ def test_create_document(request_type, transport: str = "grpc"): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) response = client.create_document(request) @@ -1755,13 +1745,7 @@ def test_update_document(request_type, transport: str = "grpc"): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) response = client.update_document(request) @@ -2432,13 +2416,7 @@ def test_get_document_rest(request_type): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) # Wrap the value into a proper Response obj @@ -3079,13 +3057,7 @@ def test_create_document_rest(request_type): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) # Wrap the value into a proper Response obj @@ -3441,13 +3413,7 @@ def test_update_document_rest(request_type): id="id_value", schema_id="schema_id_value", parent_document_id="parent_document_id_value", - struct_data=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_data="json_data_value", ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_schema_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_schema_service.py index 09bd76f6040f..5cbe21dba71f 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_schema_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_schema_service.py @@ -738,13 +738,7 @@ def test_get_schema(request_type, transport: str = "grpc"): # Designate an appropriate return value for the call. call.return_value = schema.Schema( name="name_value", - struct_schema=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_schema="json_schema_value", ) response = client.get_schema(request) @@ -1363,9 +1357,11 @@ async def test_list_schemas_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_schemas(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 @@ -2059,13 +2055,7 @@ def test_get_schema_rest(request_type): # Designate an appropriate value for the returned response. return_value = schema.Schema( name="name_value", - struct_schema=struct_pb2.Struct( - fields={ - "key_value": struct_pb2.Value( - null_value=struct_pb2.NullValue.NULL_VALUE - ) - } - ), + json_schema="json_schema_value", ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_search_service.py b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_search_service.py index 545f5aa81e16..6d09acad99ef 100644 --- a/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_search_service.py +++ b/packages/google-cloud-discoveryengine/tests/unit/gapic/discoveryengine_v1beta/test_search_service.py @@ -1058,6 +1058,8 @@ async def test_search_async_pages(): RuntimeError, ) pages = [] + # 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 (await client.search(request={})).pages: # pragma: no branch pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): diff --git a/packages/google-cloud-dms/google/cloud/clouddms/gapic_version.py b/packages/google-cloud-dms/google/cloud/clouddms/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-dms/google/cloud/clouddms/gapic_version.py +++ b/packages/google-cloud-dms/google/cloud/clouddms/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dms/google/cloud/clouddms_v1/gapic_version.py b/packages/google-cloud-dms/google/cloud/clouddms_v1/gapic_version.py index f033c615ea52..30274cc6e9dd 100644 --- a/packages/google-cloud-dms/google/cloud/clouddms_v1/gapic_version.py +++ b/packages/google-cloud-dms/google/cloud/clouddms_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.7.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dms/google/cloud/clouddms_v1/services/data_migration_service/async_client.py b/packages/google-cloud-dms/google/cloud/clouddms_v1/services/data_migration_service/async_client.py index 110fb2ad9d0a..9a00862d8c66 100644 --- a/packages/google-cloud-dms/google/cloud/clouddms_v1/services/data_migration_service/async_client.py +++ b/packages/google-cloud-dms/google/cloud/clouddms_v1/services/data_migration_service/async_client.py @@ -4905,7 +4905,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DataMigrationServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-dms/noxfile.py b/packages/google-cloud-dms/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-dms/noxfile.py +++ b/packages/google-cloud-dms/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-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_apply_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_apply_conversion_workspace_async.py new file mode 100644 index 000000000000..62f65c20d243 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_apply_conversion_workspace_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 ApplyConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_apply_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ApplyConversionWorkspaceRequest( + connection_profile="connection_profile_value", + name="name_value", + ) + + # Make the request + operation = client.apply_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_apply_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_apply_conversion_workspace_sync.py new file mode 100644 index 000000000000..d871897b5b21 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_apply_conversion_workspace_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 ApplyConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_apply_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ApplyConversionWorkspaceRequest( + connection_profile="connection_profile_value", + name="name_value", + ) + + # Make the request + operation = client.apply_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_commit_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_commit_conversion_workspace_async.py new file mode 100644 index 000000000000..ffb4df74d3a0 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_commit_conversion_workspace_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 CommitConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_commit_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.CommitConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + operation = client.commit_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_commit_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_commit_conversion_workspace_sync.py new file mode 100644 index 000000000000..7139db32e9a7 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_commit_conversion_workspace_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 CommitConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_commit_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.CommitConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + operation = client.commit_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_convert_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_convert_conversion_workspace_async.py new file mode 100644 index 000000000000..2fbb94d45e1b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_convert_conversion_workspace_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 ConvertConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_convert_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ConvertConversionWorkspaceRequest( + ) + + # Make the request + operation = client.convert_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_convert_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_convert_conversion_workspace_sync.py new file mode 100644 index 000000000000..945b7aa937ea --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_convert_conversion_workspace_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 ConvertConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_convert_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ConvertConversionWorkspaceRequest( + ) + + # Make the request + operation = client.convert_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_connection_profile_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_connection_profile_async.py new file mode 100644 index 000000000000..e7615c7af770 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_connection_profile_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 CreateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_create_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + connection_profile = clouddms_v1.ConnectionProfile() + connection_profile.mysql.host = "host_value" + connection_profile.mysql.port = 453 + connection_profile.mysql.username = "username_value" + connection_profile.mysql.password = "password_value" + + request = clouddms_v1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_connection_profile_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_connection_profile_sync.py new file mode 100644 index 000000000000..bf8cd7820e9f --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_connection_profile_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 CreateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_create_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + connection_profile = clouddms_v1.ConnectionProfile() + connection_profile.mysql.host = "host_value" + connection_profile.mysql.port = 453 + connection_profile.mysql.username = "username_value" + connection_profile.mysql.password = "password_value" + + request = clouddms_v1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_conversion_workspace_async.py new file mode 100644 index 000000000000..d8a0466a0277 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_conversion_workspace_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 CreateConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_create_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + conversion_workspace = clouddms_v1.ConversionWorkspace() + conversion_workspace.source.engine = "ORACLE" + conversion_workspace.source.version = "version_value" + conversion_workspace.destination.engine = "ORACLE" + conversion_workspace.destination.version = "version_value" + + request = clouddms_v1.CreateConversionWorkspaceRequest( + parent="parent_value", + conversion_workspace_id="conversion_workspace_id_value", + conversion_workspace=conversion_workspace, + ) + + # Make the request + operation = client.create_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_conversion_workspace_sync.py new file mode 100644 index 000000000000..0288f42061b4 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_conversion_workspace_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 CreateConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_create_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + conversion_workspace = clouddms_v1.ConversionWorkspace() + conversion_workspace.source.engine = "ORACLE" + conversion_workspace.source.version = "version_value" + conversion_workspace.destination.engine = "ORACLE" + conversion_workspace.destination.version = "version_value" + + request = clouddms_v1.CreateConversionWorkspaceRequest( + parent="parent_value", + conversion_workspace_id="conversion_workspace_id_value", + conversion_workspace=conversion_workspace, + ) + + # Make the request + operation = client.create_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_migration_job_async.py new file mode 100644 index 000000000000..cdeffd2f087b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_migration_job_async.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_create_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + migration_job = clouddms_v1.MigrationJob() + migration_job.reverse_ssh_connectivity.vm_ip = "vm_ip_value" + migration_job.reverse_ssh_connectivity.vm_port = 775 + migration_job.type_ = "CONTINUOUS" + migration_job.source = "source_value" + migration_job.destination = "destination_value" + + request = clouddms_v1.CreateMigrationJobRequest( + parent="parent_value", + migration_job_id="migration_job_id_value", + migration_job=migration_job, + ) + + # Make the request + operation = client.create_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_migration_job_sync.py new file mode 100644 index 000000000000..a7a40ba4f9e7 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_migration_job_sync.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreateMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_create_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + migration_job = clouddms_v1.MigrationJob() + migration_job.reverse_ssh_connectivity.vm_ip = "vm_ip_value" + migration_job.reverse_ssh_connectivity.vm_port = 775 + migration_job.type_ = "CONTINUOUS" + migration_job.source = "source_value" + migration_job.destination = "destination_value" + + request = clouddms_v1.CreateMigrationJobRequest( + parent="parent_value", + migration_job_id="migration_job_id_value", + migration_job=migration_job, + ) + + # Make the request + operation = client.create_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreateMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_private_connection_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_private_connection_async.py new file mode 100644 index 000000000000..eb459b7c1fe4 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_private_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 CreatePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_create_private_connection(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + private_connection = clouddms_v1.PrivateConnection() + private_connection.vpc_peering_config.vpc_name = "vpc_name_value" + private_connection.vpc_peering_config.subnet = "subnet_value" + + request = clouddms_v1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_private_connection_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_private_connection_sync.py new file mode 100644 index 000000000000..f1b9e9f0c187 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_create_private_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 CreatePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_create_private_connection(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + private_connection = clouddms_v1.PrivateConnection() + private_connection.vpc_peering_config.vpc_name = "vpc_name_value" + private_connection.vpc_peering_config.subnet = "subnet_value" + + request = clouddms_v1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_connection_profile_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_connection_profile_async.py new file mode 100644 index 000000000000..e9c7703e036b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_connection_profile_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 DeleteConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_delete_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_connection_profile_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_connection_profile_sync.py new file mode 100644 index 000000000000..4c05c38b7bfa --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_connection_profile_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 DeleteConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_delete_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_conversion_workspace_async.py new file mode 100644 index 000000000000..1472d44f05ab --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_conversion_workspace_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 DeleteConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_delete_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.DeleteConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_conversion_workspace_sync.py new file mode 100644 index 000000000000..040476347808 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_conversion_workspace_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 DeleteConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_delete_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.DeleteConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_migration_job_async.py new file mode 100644 index 000000000000..15e2bb1fe2ef --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_migration_job_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 DeleteMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_delete_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.DeleteMigrationJobRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_migration_job_sync.py new file mode 100644 index 000000000000..f00b4def7628 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_migration_job_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 DeleteMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_delete_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.DeleteMigrationJobRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_private_connection_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_private_connection_async.py new file mode 100644 index 000000000000..adaa51cf7e65 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_private_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 DeletePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_delete_private_connection(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_private_connection_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_private_connection_sync.py new file mode 100644 index 000000000000..841c724d5928 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_delete_private_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 DeletePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_delete_private_connection(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_async.py new file mode 100644 index 000000000000..e4cd078ba3f0 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_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 DescribeConversionWorkspaceRevisions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_describe_conversion_workspace_revisions(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.DescribeConversionWorkspaceRevisionsRequest( + conversion_workspace="conversion_workspace_value", + ) + + # Make the request + response = await client.describe_conversion_workspace_revisions(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_sync.py new file mode 100644 index 000000000000..1952791145fd --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_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 DescribeConversionWorkspaceRevisions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_describe_conversion_workspace_revisions(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.DescribeConversionWorkspaceRevisionsRequest( + conversion_workspace="conversion_workspace_value", + ) + + # Make the request + response = client.describe_conversion_workspace_revisions(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_database_entities_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_database_entities_async.py new file mode 100644 index 000000000000..61ced4f10d0c --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_database_entities_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 DescribeDatabaseEntities +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_describe_database_entities(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.DescribeDatabaseEntitiesRequest( + conversion_workspace="conversion_workspace_value", + ) + + # Make the request + page_result = client.describe_database_entities(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_database_entities_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_database_entities_sync.py new file mode 100644 index 000000000000..25821efe547a --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_describe_database_entities_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 DescribeDatabaseEntities +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_describe_database_entities(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.DescribeDatabaseEntitiesRequest( + conversion_workspace="conversion_workspace_value", + ) + + # Make the request + page_result = client.describe_database_entities(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_fetch_static_ips_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_fetch_static_ips_async.py new file mode 100644 index 000000000000..a1b178b1e0d8 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_fetch_static_ips_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 FetchStaticIps +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_FetchStaticIps_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_fetch_static_ips(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_FetchStaticIps_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_fetch_static_ips_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_fetch_static_ips_sync.py new file mode 100644 index 000000000000..563e9f19a665 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_fetch_static_ips_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 FetchStaticIps +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_FetchStaticIps_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_fetch_static_ips(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_FetchStaticIps_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_generate_ssh_script_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_generate_ssh_script_async.py new file mode 100644 index 000000000000..819593337ed9 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_generate_ssh_script_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 GenerateSshScript +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GenerateSshScript_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_generate_ssh_script(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + vm_creation_config = clouddms_v1.VmCreationConfig() + vm_creation_config.vm_machine_type = "vm_machine_type_value" + + request = clouddms_v1.GenerateSshScriptRequest( + vm_creation_config=vm_creation_config, + vm="vm_value", + ) + + # Make the request + response = await client.generate_ssh_script(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GenerateSshScript_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_generate_ssh_script_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_generate_ssh_script_sync.py new file mode 100644 index 000000000000..4ddf07a5b83a --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_generate_ssh_script_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 GenerateSshScript +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GenerateSshScript_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_generate_ssh_script(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + vm_creation_config = clouddms_v1.VmCreationConfig() + vm_creation_config.vm_machine_type = "vm_machine_type_value" + + request = clouddms_v1.GenerateSshScriptRequest( + vm_creation_config=vm_creation_config, + vm="vm_value", + ) + + # Make the request + response = client.generate_ssh_script(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GenerateSshScript_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_connection_profile_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_connection_profile_async.py new file mode 100644 index 000000000000..8204812a6d8b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_connection_profile_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 GetConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetConnectionProfile_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_get_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = await client.get_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetConnectionProfile_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_connection_profile_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_connection_profile_sync.py new file mode 100644 index 000000000000..abc1e5463399 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_connection_profile_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 GetConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetConnectionProfile_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_get_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetConnectionProfile_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_conversion_workspace_async.py new file mode 100644 index 000000000000..d15aa5c6a41f --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_conversion_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 GetConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_get_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.GetConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_conversion_workspace(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_conversion_workspace_sync.py new file mode 100644 index 000000000000..0ba92c80839e --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_conversion_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 GetConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_get_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.GetConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_conversion_workspace(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_migration_job_async.py new file mode 100644 index 000000000000..e9513b099956 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_migration_job_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 GetMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_get_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.GetMigrationJobRequest( + name="name_value", + ) + + # Make the request + response = await client.get_migration_job(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_migration_job_sync.py new file mode 100644 index 000000000000..f9c5c2f4afba --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_migration_job_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 GetMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_get_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.GetMigrationJobRequest( + name="name_value", + ) + + # Make the request + response = client.get_migration_job(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_private_connection_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_private_connection_async.py new file mode 100644 index 000000000000..fb0a8b3b4a16 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_private_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 GetPrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetPrivateConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_get_private_connection(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_private_connection(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetPrivateConnection_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_private_connection_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_private_connection_sync.py new file mode 100644 index 000000000000..eacb889ed9f3 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_get_private_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 GetPrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_GetPrivateConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_get_private_connection(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_GetPrivateConnection_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_import_mapping_rules_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_import_mapping_rules_async.py new file mode 100644 index 000000000000..8234d57d561b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_import_mapping_rules_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 ImportMappingRules +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ImportMappingRules_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_import_mapping_rules(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ImportMappingRulesRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_mapping_rules(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ImportMappingRules_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_import_mapping_rules_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_import_mapping_rules_sync.py new file mode 100644 index 000000000000..b5cbb0310726 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_import_mapping_rules_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 ImportMappingRules +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ImportMappingRules_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_import_mapping_rules(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ImportMappingRulesRequest( + parent="parent_value", + ) + + # Make the request + operation = client.import_mapping_rules(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ImportMappingRules_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_connection_profiles_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_connection_profiles_async.py new file mode 100644 index 000000000000..48cde5cf684f --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_connection_profiles_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 ListConnectionProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_list_connection_profiles(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_connection_profiles_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_connection_profiles_sync.py new file mode 100644 index 000000000000..e2439ba98309 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_connection_profiles_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 ListConnectionProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_list_connection_profiles(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_conversion_workspaces_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_conversion_workspaces_async.py new file mode 100644 index 000000000000..aa6d6b2b048b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_conversion_workspaces_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 ListConversionWorkspaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_list_conversion_workspaces(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ListConversionWorkspacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_conversion_workspaces(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_conversion_workspaces_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_conversion_workspaces_sync.py new file mode 100644 index 000000000000..e9e5c748a476 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_conversion_workspaces_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 ListConversionWorkspaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_list_conversion_workspaces(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ListConversionWorkspacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_conversion_workspaces(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_migration_jobs_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_migration_jobs_async.py new file mode 100644 index 000000000000..35d59508c352 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_migration_jobs_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 ListMigrationJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_list_migration_jobs(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ListMigrationJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_migration_jobs(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_migration_jobs_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_migration_jobs_sync.py new file mode 100644 index 000000000000..de9611fe2ab9 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_migration_jobs_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 ListMigrationJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListMigrationJobs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_list_migration_jobs(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ListMigrationJobsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_migration_jobs(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListMigrationJobs_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_private_connections_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_private_connections_async.py new file mode 100644 index 000000000000..0149e98f473f --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_private_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 ListPrivateConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListPrivateConnections_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_list_private_connections(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListPrivateConnections_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_private_connections_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_private_connections_sync.py new file mode 100644 index 000000000000..5eec2f662ded --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_list_private_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 ListPrivateConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ListPrivateConnections_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_list_private_connections(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ListPrivateConnections_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_promote_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_promote_migration_job_async.py new file mode 100644 index 000000000000..a7e0d5b309d5 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_promote_migration_job_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 PromoteMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_promote_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.PromoteMigrationJobRequest( + ) + + # Make the request + operation = client.promote_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_promote_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_promote_migration_job_sync.py new file mode 100644 index 000000000000..1972401f2d22 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_promote_migration_job_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 PromoteMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_promote_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.PromoteMigrationJobRequest( + ) + + # Make the request + operation = client.promote_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_restart_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_restart_migration_job_async.py new file mode 100644 index 000000000000..22db451140bb --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_restart_migration_job_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 RestartMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_restart_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.RestartMigrationJobRequest( + ) + + # Make the request + operation = client.restart_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_restart_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_restart_migration_job_sync.py new file mode 100644 index 000000000000..5f8ab1522655 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_restart_migration_job_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 RestartMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_RestartMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_restart_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.RestartMigrationJobRequest( + ) + + # Make the request + operation = client.restart_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_RestartMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_resume_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_resume_migration_job_async.py new file mode 100644 index 000000000000..c59e5dd37ccd --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_resume_migration_job_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 ResumeMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_resume_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.ResumeMigrationJobRequest( + ) + + # Make the request + operation = client.resume_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_resume_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_resume_migration_job_sync.py new file mode 100644 index 000000000000..75d40afcc6e7 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_resume_migration_job_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 ResumeMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_resume_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.ResumeMigrationJobRequest( + ) + + # Make the request + operation = client.resume_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_async.py new file mode 100644 index 000000000000..c9e922cc98c4 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_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 RollbackConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_rollback_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.RollbackConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + operation = client.rollback_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_sync.py new file mode 100644 index 000000000000..e8952f3234ea --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_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 RollbackConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_rollback_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.RollbackConversionWorkspaceRequest( + name="name_value", + ) + + # Make the request + operation = client.rollback_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_search_background_jobs_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_search_background_jobs_async.py new file mode 100644 index 000000000000..74794d4eff65 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_search_background_jobs_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 SearchBackgroundJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_search_background_jobs(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.SearchBackgroundJobsRequest( + conversion_workspace="conversion_workspace_value", + ) + + # Make the request + response = await client.search_background_jobs(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_search_background_jobs_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_search_background_jobs_sync.py new file mode 100644 index 000000000000..4ab3279703ec --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_search_background_jobs_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 SearchBackgroundJobs +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_search_background_jobs(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.SearchBackgroundJobsRequest( + conversion_workspace="conversion_workspace_value", + ) + + # Make the request + response = client.search_background_jobs(request=request) + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_seed_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_seed_conversion_workspace_async.py new file mode 100644 index 000000000000..46bdf92e438f --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_seed_conversion_workspace_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 SeedConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_seed_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.SeedConversionWorkspaceRequest( + source_connection_profile="source_connection_profile_value", + ) + + # Make the request + operation = client.seed_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_seed_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_seed_conversion_workspace_sync.py new file mode 100644 index 000000000000..647c3d242297 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_seed_conversion_workspace_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 SeedConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_seed_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.SeedConversionWorkspaceRequest( + source_connection_profile="source_connection_profile_value", + ) + + # Make the request + operation = client.seed_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_start_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_start_migration_job_async.py new file mode 100644 index 000000000000..bfe21eeff9e5 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_start_migration_job_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 StartMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_StartMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_start_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.StartMigrationJobRequest( + ) + + # Make the request + operation = client.start_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_StartMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_start_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_start_migration_job_sync.py new file mode 100644 index 000000000000..b73ede5298f0 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_start_migration_job_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 StartMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_StartMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_start_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.StartMigrationJobRequest( + ) + + # Make the request + operation = client.start_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_StartMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_async.py new file mode 100644 index 000000000000..b6352ee79fe5 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_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 StopMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_StopMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_stop_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.StopMigrationJobRequest( + ) + + # Make the request + operation = client.stop_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_StopMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_sync.py new file mode 100644 index 000000000000..9c6fdc46437b --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_stop_migration_job_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 StopMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_StopMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_stop_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.StopMigrationJobRequest( + ) + + # Make the request + operation = client.stop_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_StopMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_connection_profile_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_connection_profile_async.py new file mode 100644 index 000000000000..4776efa51896 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_connection_profile_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 UpdateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_update_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + connection_profile = clouddms_v1.ConnectionProfile() + connection_profile.mysql.host = "host_value" + connection_profile.mysql.port = 453 + connection_profile.mysql.username = "username_value" + connection_profile.mysql.password = "password_value" + + request = clouddms_v1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_connection_profile_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_connection_profile_sync.py new file mode 100644 index 000000000000..68cae51e1e5c --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_connection_profile_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 UpdateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_update_connection_profile(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + connection_profile = clouddms_v1.ConnectionProfile() + connection_profile.mysql.host = "host_value" + connection_profile.mysql.port = 453 + connection_profile.mysql.username = "username_value" + connection_profile.mysql.password = "password_value" + + request = clouddms_v1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_conversion_workspace_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_conversion_workspace_async.py new file mode 100644 index 000000000000..3361ce9e0116 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_conversion_workspace_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 UpdateConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_update_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + conversion_workspace = clouddms_v1.ConversionWorkspace() + conversion_workspace.source.engine = "ORACLE" + conversion_workspace.source.version = "version_value" + conversion_workspace.destination.engine = "ORACLE" + conversion_workspace.destination.version = "version_value" + + request = clouddms_v1.UpdateConversionWorkspaceRequest( + conversion_workspace=conversion_workspace, + ) + + # Make the request + operation = client.update_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_conversion_workspace_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_conversion_workspace_sync.py new file mode 100644 index 000000000000..2a1ba334fed5 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_conversion_workspace_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 UpdateConversionWorkspace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_update_conversion_workspace(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + conversion_workspace = clouddms_v1.ConversionWorkspace() + conversion_workspace.source.engine = "ORACLE" + conversion_workspace.source.version = "version_value" + conversion_workspace.destination.engine = "ORACLE" + conversion_workspace.destination.version = "version_value" + + request = clouddms_v1.UpdateConversionWorkspaceRequest( + conversion_workspace=conversion_workspace, + ) + + # Make the request + operation = client.update_conversion_workspace(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_migration_job_async.py new file mode 100644 index 000000000000..76363dcf25a8 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_migration_job_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 UpdateMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_update_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + migration_job = clouddms_v1.MigrationJob() + migration_job.reverse_ssh_connectivity.vm_ip = "vm_ip_value" + migration_job.reverse_ssh_connectivity.vm_port = 775 + migration_job.type_ = "CONTINUOUS" + migration_job.source = "source_value" + migration_job.destination = "destination_value" + + request = clouddms_v1.UpdateMigrationJobRequest( + migration_job=migration_job, + ) + + # Make the request + operation = client.update_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_migration_job_sync.py new file mode 100644 index 000000000000..35eee8d3ffbf --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_update_migration_job_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 UpdateMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_update_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + migration_job = clouddms_v1.MigrationJob() + migration_job.reverse_ssh_connectivity.vm_ip = "vm_ip_value" + migration_job.reverse_ssh_connectivity.vm_port = 775 + migration_job.type_ = "CONTINUOUS" + migration_job.source = "source_value" + migration_job.destination = "destination_value" + + request = clouddms_v1.UpdateMigrationJobRequest( + migration_job=migration_job, + ) + + # Make the request + operation = client.update_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_verify_migration_job_async.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_verify_migration_job_async.py new file mode 100644 index 000000000000..daee5a74da28 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_verify_migration_job_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 VerifyMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +async def sample_verify_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceAsyncClient() + + # Initialize request argument(s) + request = clouddms_v1.VerifyMigrationJobRequest( + ) + + # Make the request + operation = client.verify_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async] diff --git a/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_verify_migration_job_sync.py b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_verify_migration_job_sync.py new file mode 100644 index 000000000000..901a5f7e0fa7 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/datamigration_v1_generated_data_migration_service_verify_migration_job_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 VerifyMigrationJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-dms + + +# [START datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import clouddms_v1 + + +def sample_verify_migration_job(): + # Create a client + client = clouddms_v1.DataMigrationServiceClient() + + # Initialize request argument(s) + request = clouddms_v1.VerifyMigrationJobRequest( + ) + + # Make the request + operation = client.verify_migration_job(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_sync] diff --git a/packages/google-cloud-dms/samples/generated_samples/snippet_metadata_google.cloud.clouddms.v1.json b/packages/google-cloud-dms/samples/generated_samples/snippet_metadata_google.cloud.clouddms.v1.json new file mode 100644 index 000000000000..10d2ba4a5023 --- /dev/null +++ b/packages/google-cloud-dms/samples/generated_samples/snippet_metadata_google.cloud.clouddms.v1.json @@ -0,0 +1,5771 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.clouddms.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-dms", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.apply_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ApplyConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ApplyConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ApplyConversionWorkspaceRequest" + }, + { + "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": "apply_conversion_workspace" + }, + "description": "Sample for ApplyConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_apply_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_apply_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.apply_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ApplyConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ApplyConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ApplyConversionWorkspaceRequest" + }, + { + "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": "apply_conversion_workspace" + }, + "description": "Sample for ApplyConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_apply_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_apply_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.commit_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CommitConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CommitConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CommitConversionWorkspaceRequest" + }, + { + "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": "commit_conversion_workspace" + }, + "description": "Sample for CommitConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_commit_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_commit_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.commit_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CommitConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CommitConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CommitConversionWorkspaceRequest" + }, + { + "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": "commit_conversion_workspace" + }, + "description": "Sample for CommitConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_commit_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_commit_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.convert_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ConvertConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ConvertConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ConvertConversionWorkspaceRequest" + }, + { + "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": "convert_conversion_workspace" + }, + "description": "Sample for ConvertConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_convert_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_convert_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.convert_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ConvertConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ConvertConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ConvertConversionWorkspaceRequest" + }, + { + "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": "convert_conversion_workspace" + }, + "description": "Sample for ConvertConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_convert_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_convert_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.create_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreateConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreateConnectionProfileRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "connection_profile", + "type": "google.cloud.clouddms_v1.types.ConnectionProfile" + }, + { + "name": "connection_profile_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_connection_profile" + }, + "description": "Sample for CreateConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_create_connection_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_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": "datamigration_v1_generated_data_migration_service_create_connection_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.create_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreateConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreateConnectionProfileRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "connection_profile", + "type": "google.cloud.clouddms_v1.types.ConnectionProfile" + }, + { + "name": "connection_profile_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_connection_profile" + }, + "description": "Sample for CreateConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_create_connection_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_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": "datamigration_v1_generated_data_migration_service_create_connection_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.create_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreateConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreateConversionWorkspaceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "conversion_workspace", + "type": "google.cloud.clouddms_v1.types.ConversionWorkspace" + }, + { + "name": "conversion_workspace_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_conversion_workspace" + }, + "description": "Sample for CreateConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_create_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_create_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.create_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreateConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreateConversionWorkspaceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "conversion_workspace", + "type": "google.cloud.clouddms_v1.types.ConversionWorkspace" + }, + { + "name": "conversion_workspace_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_conversion_workspace" + }, + "description": "Sample for CreateConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_create_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_create_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.create_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreateMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreateMigrationJobRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "migration_job", + "type": "google.cloud.clouddms_v1.types.MigrationJob" + }, + { + "name": "migration_job_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_migration_job" + }, + "description": "Sample for CreateMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_create_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async", + "segments": [ + { + "end": 64, + "start": 27, + "type": "FULL" + }, + { + "end": 64, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 54, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 61, + "start": 55, + "type": "REQUEST_EXECUTION" + }, + { + "end": 65, + "start": 62, + "type": "RESPONSE_HANDLING" + } + ], + "title": "datamigration_v1_generated_data_migration_service_create_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.create_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreateMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreateMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreateMigrationJobRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "migration_job", + "type": "google.cloud.clouddms_v1.types.MigrationJob" + }, + { + "name": "migration_job_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_migration_job" + }, + "description": "Sample for CreateMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_create_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreateMigrationJob_sync", + "segments": [ + { + "end": 64, + "start": 27, + "type": "FULL" + }, + { + "end": 64, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 54, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 61, + "start": 55, + "type": "REQUEST_EXECUTION" + }, + { + "end": 65, + "start": 62, + "type": "RESPONSE_HANDLING" + } + ], + "title": "datamigration_v1_generated_data_migration_service_create_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.create_private_connection", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreatePrivateConnection", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreatePrivateConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreatePrivateConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "private_connection", + "type": "google.cloud.clouddms_v1.types.PrivateConnection" + }, + { + "name": "private_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_private_connection" + }, + "description": "Sample for CreatePrivateConnection", + "file": "datamigration_v1_generated_data_migration_service_create_private_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_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": "datamigration_v1_generated_data_migration_service_create_private_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.create_private_connection", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.CreatePrivateConnection", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "CreatePrivateConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.CreatePrivateConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "private_connection", + "type": "google.cloud.clouddms_v1.types.PrivateConnection" + }, + { + "name": "private_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_private_connection" + }, + "description": "Sample for CreatePrivateConnection", + "file": "datamigration_v1_generated_data_migration_service_create_private_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_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": "datamigration_v1_generated_data_migration_service_create_private_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.delete_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeleteConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeleteConnectionProfileRequest" + }, + { + "name": "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_connection_profile" + }, + "description": "Sample for DeleteConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_delete_connection_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_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": "datamigration_v1_generated_data_migration_service_delete_connection_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.delete_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeleteConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeleteConnectionProfileRequest" + }, + { + "name": "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_connection_profile" + }, + "description": "Sample for DeleteConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_delete_connection_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_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": "datamigration_v1_generated_data_migration_service_delete_connection_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.delete_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeleteConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeleteConversionWorkspaceRequest" + }, + { + "name": "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_conversion_workspace" + }, + "description": "Sample for DeleteConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_delete_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_delete_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.delete_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeleteConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeleteConversionWorkspaceRequest" + }, + { + "name": "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_conversion_workspace" + }, + "description": "Sample for DeleteConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_delete_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_delete_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.delete_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeleteMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeleteMigrationJobRequest" + }, + { + "name": "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_migration_job" + }, + "description": "Sample for DeleteMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_delete_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_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": "datamigration_v1_generated_data_migration_service_delete_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.delete_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeleteMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeleteMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeleteMigrationJobRequest" + }, + { + "name": "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_migration_job" + }, + "description": "Sample for DeleteMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_delete_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_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": "datamigration_v1_generated_data_migration_service_delete_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.delete_private_connection", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeletePrivateConnection", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeletePrivateConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeletePrivateConnectionRequest" + }, + { + "name": "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_private_connection" + }, + "description": "Sample for DeletePrivateConnection", + "file": "datamigration_v1_generated_data_migration_service_delete_private_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_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": "datamigration_v1_generated_data_migration_service_delete_private_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.delete_private_connection", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DeletePrivateConnection", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DeletePrivateConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DeletePrivateConnectionRequest" + }, + { + "name": "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_private_connection" + }, + "description": "Sample for DeletePrivateConnection", + "file": "datamigration_v1_generated_data_migration_service_delete_private_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_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": "datamigration_v1_generated_data_migration_service_delete_private_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.describe_conversion_workspace_revisions", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeConversionWorkspaceRevisions", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DescribeConversionWorkspaceRevisions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsResponse", + "shortName": "describe_conversion_workspace_revisions" + }, + "description": "Sample for DescribeConversionWorkspaceRevisions", + "file": "datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_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": "datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.describe_conversion_workspace_revisions", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeConversionWorkspaceRevisions", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DescribeConversionWorkspaceRevisions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.types.DescribeConversionWorkspaceRevisionsResponse", + "shortName": "describe_conversion_workspace_revisions" + }, + "description": "Sample for DescribeConversionWorkspaceRevisions", + "file": "datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DescribeConversionWorkspaceRevisions_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": "datamigration_v1_generated_data_migration_service_describe_conversion_workspace_revisions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.describe_database_entities", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeDatabaseEntities", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DescribeDatabaseEntities" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesAsyncPager", + "shortName": "describe_database_entities" + }, + "description": "Sample for DescribeDatabaseEntities", + "file": "datamigration_v1_generated_data_migration_service_describe_database_entities_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_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": "datamigration_v1_generated_data_migration_service_describe_database_entities_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.describe_database_entities", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.DescribeDatabaseEntities", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "DescribeDatabaseEntities" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.DescribeDatabaseEntitiesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.services.data_migration_service.pagers.DescribeDatabaseEntitiesPager", + "shortName": "describe_database_entities" + }, + "description": "Sample for DescribeDatabaseEntities", + "file": "datamigration_v1_generated_data_migration_service_describe_database_entities_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_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": "datamigration_v1_generated_data_migration_service_describe_database_entities_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.fetch_static_ips", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.FetchStaticIps", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "FetchStaticIps" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.FetchStaticIpsRequest" + }, + { + "name": "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.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsAsyncPager", + "shortName": "fetch_static_ips" + }, + "description": "Sample for FetchStaticIps", + "file": "datamigration_v1_generated_data_migration_service_fetch_static_ips_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_FetchStaticIps_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": "datamigration_v1_generated_data_migration_service_fetch_static_ips_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.fetch_static_ips", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.FetchStaticIps", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "FetchStaticIps" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.FetchStaticIpsRequest" + }, + { + "name": "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.clouddms_v1.services.data_migration_service.pagers.FetchStaticIpsPager", + "shortName": "fetch_static_ips" + }, + "description": "Sample for FetchStaticIps", + "file": "datamigration_v1_generated_data_migration_service_fetch_static_ips_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_FetchStaticIps_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": "datamigration_v1_generated_data_migration_service_fetch_static_ips_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.generate_ssh_script", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GenerateSshScript", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GenerateSshScript" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GenerateSshScriptRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.types.SshScript", + "shortName": "generate_ssh_script" + }, + "description": "Sample for GenerateSshScript", + "file": "datamigration_v1_generated_data_migration_service_generate_ssh_script_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GenerateSshScript_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": "datamigration_v1_generated_data_migration_service_generate_ssh_script_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.generate_ssh_script", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GenerateSshScript", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GenerateSshScript" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GenerateSshScriptRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.types.SshScript", + "shortName": "generate_ssh_script" + }, + "description": "Sample for GenerateSshScript", + "file": "datamigration_v1_generated_data_migration_service_generate_ssh_script_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GenerateSshScript_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": "datamigration_v1_generated_data_migration_service_generate_ssh_script_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.get_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetConnectionProfileRequest" + }, + { + "name": "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.clouddms_v1.types.ConnectionProfile", + "shortName": "get_connection_profile" + }, + "description": "Sample for GetConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_get_connection_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetConnectionProfile_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": "datamigration_v1_generated_data_migration_service_get_connection_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.get_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetConnectionProfileRequest" + }, + { + "name": "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.clouddms_v1.types.ConnectionProfile", + "shortName": "get_connection_profile" + }, + "description": "Sample for GetConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_get_connection_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetConnectionProfile_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": "datamigration_v1_generated_data_migration_service_get_connection_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.get_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetConversionWorkspaceRequest" + }, + { + "name": "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.clouddms_v1.types.ConversionWorkspace", + "shortName": "get_conversion_workspace" + }, + "description": "Sample for GetConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_get_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_get_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.get_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetConversionWorkspaceRequest" + }, + { + "name": "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.clouddms_v1.types.ConversionWorkspace", + "shortName": "get_conversion_workspace" + }, + "description": "Sample for GetConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_get_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_get_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.get_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetMigrationJobRequest" + }, + { + "name": "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.clouddms_v1.types.MigrationJob", + "shortName": "get_migration_job" + }, + "description": "Sample for GetMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_get_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetMigrationJob_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": "datamigration_v1_generated_data_migration_service_get_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.get_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetMigrationJobRequest" + }, + { + "name": "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.clouddms_v1.types.MigrationJob", + "shortName": "get_migration_job" + }, + "description": "Sample for GetMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_get_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetMigrationJob_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": "datamigration_v1_generated_data_migration_service_get_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.get_private_connection", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetPrivateConnection", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetPrivateConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetPrivateConnectionRequest" + }, + { + "name": "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.clouddms_v1.types.PrivateConnection", + "shortName": "get_private_connection" + }, + "description": "Sample for GetPrivateConnection", + "file": "datamigration_v1_generated_data_migration_service_get_private_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetPrivateConnection_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": "datamigration_v1_generated_data_migration_service_get_private_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.get_private_connection", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.GetPrivateConnection", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "GetPrivateConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.GetPrivateConnectionRequest" + }, + { + "name": "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.clouddms_v1.types.PrivateConnection", + "shortName": "get_private_connection" + }, + "description": "Sample for GetPrivateConnection", + "file": "datamigration_v1_generated_data_migration_service_get_private_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_GetPrivateConnection_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": "datamigration_v1_generated_data_migration_service_get_private_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.import_mapping_rules", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ImportMappingRules", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ImportMappingRules" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ImportMappingRulesRequest" + }, + { + "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_mapping_rules" + }, + "description": "Sample for ImportMappingRules", + "file": "datamigration_v1_generated_data_migration_service_import_mapping_rules_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ImportMappingRules_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": "datamigration_v1_generated_data_migration_service_import_mapping_rules_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.import_mapping_rules", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ImportMappingRules", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ImportMappingRules" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ImportMappingRulesRequest" + }, + { + "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_mapping_rules" + }, + "description": "Sample for ImportMappingRules", + "file": "datamigration_v1_generated_data_migration_service_import_mapping_rules_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ImportMappingRules_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": "datamigration_v1_generated_data_migration_service_import_mapping_rules_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.list_connection_profiles", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListConnectionProfiles", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListConnectionProfiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListConnectionProfilesRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesAsyncPager", + "shortName": "list_connection_profiles" + }, + "description": "Sample for ListConnectionProfiles", + "file": "datamigration_v1_generated_data_migration_service_list_connection_profiles_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_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": "datamigration_v1_generated_data_migration_service_list_connection_profiles_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.list_connection_profiles", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListConnectionProfiles", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListConnectionProfiles" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListConnectionProfilesRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListConnectionProfilesPager", + "shortName": "list_connection_profiles" + }, + "description": "Sample for ListConnectionProfiles", + "file": "datamigration_v1_generated_data_migration_service_list_connection_profiles_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_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": "datamigration_v1_generated_data_migration_service_list_connection_profiles_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.list_conversion_workspaces", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListConversionWorkspaces", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListConversionWorkspaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListConversionWorkspacesRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesAsyncPager", + "shortName": "list_conversion_workspaces" + }, + "description": "Sample for ListConversionWorkspaces", + "file": "datamigration_v1_generated_data_migration_service_list_conversion_workspaces_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_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": "datamigration_v1_generated_data_migration_service_list_conversion_workspaces_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.list_conversion_workspaces", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListConversionWorkspaces", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListConversionWorkspaces" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListConversionWorkspacesRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListConversionWorkspacesPager", + "shortName": "list_conversion_workspaces" + }, + "description": "Sample for ListConversionWorkspaces", + "file": "datamigration_v1_generated_data_migration_service_list_conversion_workspaces_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_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": "datamigration_v1_generated_data_migration_service_list_conversion_workspaces_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.list_migration_jobs", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListMigrationJobs", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListMigrationJobs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListMigrationJobsRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsAsyncPager", + "shortName": "list_migration_jobs" + }, + "description": "Sample for ListMigrationJobs", + "file": "datamigration_v1_generated_data_migration_service_list_migration_jobs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListMigrationJobs_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": "datamigration_v1_generated_data_migration_service_list_migration_jobs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.list_migration_jobs", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListMigrationJobs", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListMigrationJobs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListMigrationJobsRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListMigrationJobsPager", + "shortName": "list_migration_jobs" + }, + "description": "Sample for ListMigrationJobs", + "file": "datamigration_v1_generated_data_migration_service_list_migration_jobs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListMigrationJobs_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": "datamigration_v1_generated_data_migration_service_list_migration_jobs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.list_private_connections", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListPrivateConnections", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListPrivateConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListPrivateConnectionsRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsAsyncPager", + "shortName": "list_private_connections" + }, + "description": "Sample for ListPrivateConnections", + "file": "datamigration_v1_generated_data_migration_service_list_private_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListPrivateConnections_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": "datamigration_v1_generated_data_migration_service_list_private_connections_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.list_private_connections", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ListPrivateConnections", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ListPrivateConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ListPrivateConnectionsRequest" + }, + { + "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.clouddms_v1.services.data_migration_service.pagers.ListPrivateConnectionsPager", + "shortName": "list_private_connections" + }, + "description": "Sample for ListPrivateConnections", + "file": "datamigration_v1_generated_data_migration_service_list_private_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ListPrivateConnections_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": "datamigration_v1_generated_data_migration_service_list_private_connections_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.promote_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.PromoteMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "PromoteMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.PromoteMigrationJobRequest" + }, + { + "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": "promote_migration_job" + }, + "description": "Sample for PromoteMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_promote_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_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": "datamigration_v1_generated_data_migration_service_promote_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.promote_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.PromoteMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "PromoteMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.PromoteMigrationJobRequest" + }, + { + "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": "promote_migration_job" + }, + "description": "Sample for PromoteMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_promote_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_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": "datamigration_v1_generated_data_migration_service_promote_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.restart_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.RestartMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "RestartMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.RestartMigrationJobRequest" + }, + { + "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": "restart_migration_job" + }, + "description": "Sample for RestartMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_restart_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_RestartMigrationJob_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": "datamigration_v1_generated_data_migration_service_restart_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.restart_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.RestartMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "RestartMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.RestartMigrationJobRequest" + }, + { + "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": "restart_migration_job" + }, + "description": "Sample for RestartMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_restart_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_RestartMigrationJob_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": "datamigration_v1_generated_data_migration_service_restart_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.resume_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ResumeMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ResumeMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ResumeMigrationJobRequest" + }, + { + "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": "resume_migration_job" + }, + "description": "Sample for ResumeMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_resume_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_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": "datamigration_v1_generated_data_migration_service_resume_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.resume_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.ResumeMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "ResumeMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.ResumeMigrationJobRequest" + }, + { + "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": "resume_migration_job" + }, + "description": "Sample for ResumeMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_resume_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_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": "datamigration_v1_generated_data_migration_service_resume_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.rollback_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.RollbackConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "RollbackConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.RollbackConversionWorkspaceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "rollback_conversion_workspace" + }, + "description": "Sample for RollbackConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.rollback_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.RollbackConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "RollbackConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.RollbackConversionWorkspaceRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "rollback_conversion_workspace" + }, + "description": "Sample for RollbackConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_rollback_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.search_background_jobs", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SearchBackgroundJobs", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "SearchBackgroundJobs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.SearchBackgroundJobsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.types.SearchBackgroundJobsResponse", + "shortName": "search_background_jobs" + }, + "description": "Sample for SearchBackgroundJobs", + "file": "datamigration_v1_generated_data_migration_service_search_background_jobs_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_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": "datamigration_v1_generated_data_migration_service_search_background_jobs_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.search_background_jobs", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SearchBackgroundJobs", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "SearchBackgroundJobs" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.SearchBackgroundJobsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.clouddms_v1.types.SearchBackgroundJobsResponse", + "shortName": "search_background_jobs" + }, + "description": "Sample for SearchBackgroundJobs", + "file": "datamigration_v1_generated_data_migration_service_search_background_jobs_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_SearchBackgroundJobs_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": "datamigration_v1_generated_data_migration_service_search_background_jobs_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.seed_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SeedConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "SeedConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.SeedConversionWorkspaceRequest" + }, + { + "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": "seed_conversion_workspace" + }, + "description": "Sample for SeedConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_seed_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_seed_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.seed_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.SeedConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "SeedConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.SeedConversionWorkspaceRequest" + }, + { + "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": "seed_conversion_workspace" + }, + "description": "Sample for SeedConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_seed_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_seed_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.start_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.StartMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "StartMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.StartMigrationJobRequest" + }, + { + "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_migration_job" + }, + "description": "Sample for StartMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_start_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_StartMigrationJob_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": "datamigration_v1_generated_data_migration_service_start_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.start_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.StartMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "StartMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.StartMigrationJobRequest" + }, + { + "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_migration_job" + }, + "description": "Sample for StartMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_start_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_StartMigrationJob_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": "datamigration_v1_generated_data_migration_service_start_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.stop_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.StopMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "StopMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.StopMigrationJobRequest" + }, + { + "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_migration_job" + }, + "description": "Sample for StopMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_stop_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_StopMigrationJob_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": "datamigration_v1_generated_data_migration_service_stop_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.stop_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.StopMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "StopMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.StopMigrationJobRequest" + }, + { + "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_migration_job" + }, + "description": "Sample for StopMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_stop_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_StopMigrationJob_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": "datamigration_v1_generated_data_migration_service_stop_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.update_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "UpdateConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.UpdateConnectionProfileRequest" + }, + { + "name": "connection_profile", + "type": "google.cloud.clouddms_v1.types.ConnectionProfile" + }, + { + "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_connection_profile" + }, + "description": "Sample for UpdateConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_update_connection_profile_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_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": "datamigration_v1_generated_data_migration_service_update_connection_profile_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.update_connection_profile", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateConnectionProfile", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "UpdateConnectionProfile" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.UpdateConnectionProfileRequest" + }, + { + "name": "connection_profile", + "type": "google.cloud.clouddms_v1.types.ConnectionProfile" + }, + { + "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_connection_profile" + }, + "description": "Sample for UpdateConnectionProfile", + "file": "datamigration_v1_generated_data_migration_service_update_connection_profile_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_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": "datamigration_v1_generated_data_migration_service_update_connection_profile_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.update_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "UpdateConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.UpdateConversionWorkspaceRequest" + }, + { + "name": "conversion_workspace", + "type": "google.cloud.clouddms_v1.types.ConversionWorkspace" + }, + { + "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_conversion_workspace" + }, + "description": "Sample for UpdateConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_update_conversion_workspace_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_update_conversion_workspace_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.update_conversion_workspace", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateConversionWorkspace", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "UpdateConversionWorkspace" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.UpdateConversionWorkspaceRequest" + }, + { + "name": "conversion_workspace", + "type": "google.cloud.clouddms_v1.types.ConversionWorkspace" + }, + { + "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_conversion_workspace" + }, + "description": "Sample for UpdateConversionWorkspace", + "file": "datamigration_v1_generated_data_migration_service_update_conversion_workspace_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_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": "datamigration_v1_generated_data_migration_service_update_conversion_workspace_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.update_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "UpdateMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.UpdateMigrationJobRequest" + }, + { + "name": "migration_job", + "type": "google.cloud.clouddms_v1.types.MigrationJob" + }, + { + "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_migration_job" + }, + "description": "Sample for UpdateMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_update_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_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": "datamigration_v1_generated_data_migration_service_update_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.update_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.UpdateMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "UpdateMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.UpdateMigrationJobRequest" + }, + { + "name": "migration_job", + "type": "google.cloud.clouddms_v1.types.MigrationJob" + }, + { + "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_migration_job" + }, + "description": "Sample for UpdateMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_update_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_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": "datamigration_v1_generated_data_migration_service_update_migration_job_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient", + "shortName": "DataMigrationServiceAsyncClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceAsyncClient.verify_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.VerifyMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "VerifyMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.VerifyMigrationJobRequest" + }, + { + "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": "verify_migration_job" + }, + "description": "Sample for VerifyMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_verify_migration_job_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_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": "datamigration_v1_generated_data_migration_service_verify_migration_job_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient", + "shortName": "DataMigrationServiceClient" + }, + "fullName": "google.cloud.clouddms_v1.DataMigrationServiceClient.verify_migration_job", + "method": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService.VerifyMigrationJob", + "service": { + "fullName": "google.cloud.clouddms.v1.DataMigrationService", + "shortName": "DataMigrationService" + }, + "shortName": "VerifyMigrationJob" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.clouddms_v1.types.VerifyMigrationJobRequest" + }, + { + "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": "verify_migration_job" + }, + "description": "Sample for VerifyMigrationJob", + "file": "datamigration_v1_generated_data_migration_service_verify_migration_job_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_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": "datamigration_v1_generated_data_migration_service_verify_migration_job_sync.py" + } + ] +} diff --git a/packages/google-cloud-dms/tests/unit/gapic/clouddms_v1/test_data_migration_service.py b/packages/google-cloud-dms/tests/unit/gapic/clouddms_v1/test_data_migration_service.py index 8d4ed14c5c35..6d3ac470d5a7 100644 --- a/packages/google-cloud-dms/tests/unit/gapic/clouddms_v1/test_data_migration_service.py +++ b/packages/google-cloud-dms/tests/unit/gapic/clouddms_v1/test_data_migration_service.py @@ -1166,9 +1166,11 @@ async def test_list_migration_jobs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_migration_jobs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1207,9 +1209,6 @@ def test_get_migration_job(request_type, transport: str = "grpc"): destination="destination_value", filter="filter_value", cmek_key_name="cmek_key_name_value", - reverse_ssh_connectivity=clouddms_resources.ReverseSshConnectivity( - vm_ip="vm_ip_value" - ), ) response = client.get_migration_job(request) @@ -3731,9 +3730,11 @@ async def test_list_connection_profiles_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_connection_profiles(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 @@ -3766,7 +3767,6 @@ def test_get_connection_profile(request_type, transport: str = "grpc"): state=clouddms_resources.ConnectionProfile.State.DRAFT, display_name="display_name_value", provider=clouddms_resources.DatabaseProvider.CLOUDSQL, - mysql=clouddms_resources.MySqlConnectionProfile(host="host_value"), ) response = client.get_connection_profile(request) @@ -5038,9 +5038,6 @@ def test_get_private_connection(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", state=clouddms_resources.PrivateConnection.State.CREATING, - vpc_peering_config=clouddms_resources.VpcPeeringConfig( - vpc_name="vpc_name_value" - ), ) response = client.get_private_connection(request) @@ -5709,9 +5706,11 @@ async def test_list_private_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_private_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 @@ -6661,9 +6660,11 @@ async def test_list_conversion_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_conversion_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 @@ -8721,9 +8722,11 @@ async def test_describe_database_entities_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.describe_database_entities(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 @@ -9454,9 +9457,11 @@ async def test_fetch_static_ips_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.fetch_static_ips(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-documentai/google/cloud/documentai/gapic_version.py b/packages/google-cloud-documentai/google/cloud/documentai/gapic_version.py index a2303530d547..30274cc6e9dd 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai/gapic_version.py +++ b/packages/google-cloud-documentai/google/cloud/documentai/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1/gapic_version.py b/packages/google-cloud-documentai/google/cloud/documentai_v1/gapic_version.py index a2303530d547..30274cc6e9dd 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1/gapic_version.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1/services/document_processor_service/async_client.py b/packages/google-cloud-documentai/google/cloud/documentai_v1/services/document_processor_service/async_client.py index 8f9fe8860665..35c8199c7b45 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1/services/document_processor_service/async_client.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1/services/document_processor_service/async_client.py @@ -3137,7 +3137,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DocumentProcessorServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/gapic_version.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/gapic_version.py index a2303530d547..30274cc6e9dd 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/gapic_version.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py index 786d2ab2dc65..fa152b2a737e 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta2/services/document_understanding_service/async_client.py @@ -461,7 +461,7 @@ async def sample_process_document(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DocumentUnderstandingServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/gapic_version.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/gapic_version.py index a2303530d547..30274cc6e9dd 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/gapic_version.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.16.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py index 9511b4a83e41..d6eeca8203af 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py @@ -3277,7 +3277,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DocumentProcessorServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_service/async_client.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_service/async_client.py index 834a18413e00..34152af2fbe0 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_service/async_client.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_service/async_client.py @@ -842,7 +842,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DocumentServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-documentai/noxfile.py b/packages/google-cloud-documentai/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-documentai/noxfile.py +++ b/packages/google-cloud-documentai/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-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json index e40623d05ab3..96d60af285a2 100644 --- a/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-documentai", - "version": "2.16.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json index cadc31a661e5..ef56bd7e3eb3 100644 --- a/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-documentai", - "version": "2.16.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json index edeb854b7e1f..7beb3722f985 100644 --- a/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-documentai", - "version": "2.16.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_service.py b/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_service.py index 99def3298414..a13241de71f6 100644 --- a/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_service.py +++ b/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_service.py @@ -1934,9 +1934,11 @@ async def test_list_processor_types_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_processor_types(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 @@ -2622,9 +2624,11 @@ async def test_list_processors_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_processors(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 @@ -3836,9 +3840,11 @@ async def test_list_processor_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_processor_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 @@ -6638,9 +6644,11 @@ async def test_list_evaluations_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_evaluations(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-documentai/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py b/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py index d4fd2380ec75..b4ca855fbd35 100644 --- a/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py +++ b/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py @@ -1940,9 +1940,11 @@ async def test_list_processor_types_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_processor_types(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 @@ -2628,9 +2630,11 @@ async def test_list_processors_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_processors(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 @@ -3842,9 +3846,11 @@ async def test_list_processor_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_processor_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 @@ -6644,9 +6650,11 @@ async def test_list_evaluations_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_evaluations(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-domains/google/cloud/domains/gapic_version.py b/packages/google-cloud-domains/google/cloud/domains/gapic_version.py index 69ff013987c9..30274cc6e9dd 100644 --- a/packages/google-cloud-domains/google/cloud/domains/gapic_version.py +++ b/packages/google-cloud-domains/google/cloud/domains/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-domains/google/cloud/domains_v1/gapic_version.py b/packages/google-cloud-domains/google/cloud/domains_v1/gapic_version.py index 69ff013987c9..30274cc6e9dd 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1/gapic_version.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-domains/google/cloud/domains_v1/services/domains/async_client.py b/packages/google-cloud-domains/google/cloud/domains_v1/services/domains/async_client.py index 0d5781114c3e..ff57a3f76ce4 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1/services/domains/async_client.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1/services/domains/async_client.py @@ -2328,7 +2328,7 @@ async def sample_reset_authorization_code(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DomainsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-domains/google/cloud/domains_v1beta1/gapic_version.py b/packages/google-cloud-domains/google/cloud/domains_v1beta1/gapic_version.py index 69ff013987c9..30274cc6e9dd 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1beta1/gapic_version.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/async_client.py b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/async_client.py index 3db694217d2b..e708900a4bf0 100644 --- a/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/async_client.py +++ b/packages/google-cloud-domains/google/cloud/domains_v1beta1/services/domains/async_client.py @@ -2328,7 +2328,7 @@ async def sample_reset_authorization_code(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DomainsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-domains/noxfile.py b/packages/google-cloud-domains/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-domains/noxfile.py +++ b/packages/google-cloud-domains/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-domains/samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_async.py new file mode 100644 index 000000000000..585c2f35b80c --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_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 ConfigureContactSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ConfigureContactSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_configure_contact_settings(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.ConfigureContactSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_contact_settings(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ConfigureContactSettings_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_sync.py new file mode 100644 index 000000000000..194933c79ceb --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_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 ConfigureContactSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ConfigureContactSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_configure_contact_settings(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.ConfigureContactSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_contact_settings(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ConfigureContactSettings_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_dns_settings_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_dns_settings_async.py new file mode 100644 index 000000000000..98ccae92b437 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_dns_settings_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 ConfigureDnsSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ConfigureDnsSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_configure_dns_settings(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.ConfigureDnsSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_dns_settings(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ConfigureDnsSettings_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_dns_settings_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_dns_settings_sync.py new file mode 100644 index 000000000000..111b4e6b0a67 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_dns_settings_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 ConfigureDnsSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ConfigureDnsSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_configure_dns_settings(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.ConfigureDnsSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_dns_settings(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ConfigureDnsSettings_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_management_settings_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_management_settings_async.py new file mode 100644 index 000000000000..ce082daeac1d --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_management_settings_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 ConfigureManagementSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ConfigureManagementSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_configure_management_settings(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.ConfigureManagementSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_management_settings(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ConfigureManagementSettings_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_management_settings_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_management_settings_sync.py new file mode 100644 index 000000000000..834a0fce885b --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_configure_management_settings_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 ConfigureManagementSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ConfigureManagementSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_configure_management_settings(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.ConfigureManagementSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_management_settings(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ConfigureManagementSettings_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_delete_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_delete_registration_async.py new file mode 100644 index 000000000000..2cf9e84994c9 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_delete_registration_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 DeleteRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_DeleteRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_delete_registration(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.DeleteRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_registration(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_DeleteRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_delete_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_delete_registration_sync.py new file mode 100644 index 000000000000..468a20a1a164 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_delete_registration_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 DeleteRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_DeleteRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_delete_registration(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.DeleteRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_registration(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_DeleteRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_export_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_export_registration_async.py new file mode 100644 index 000000000000..8cb7dc7af14b --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_export_registration_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 ExportRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ExportRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_export_registration(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.ExportRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.export_registration(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ExportRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_export_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_export_registration_sync.py new file mode 100644 index 000000000000..28868cbc0ce5 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_export_registration_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 ExportRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ExportRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_export_registration(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.ExportRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.export_registration(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ExportRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_get_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_get_registration_async.py new file mode 100644 index 000000000000..d339699ce117 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_get_registration_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_GetRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_get_registration(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.GetRegistrationRequest( + name="name_value", + ) + + # Make the request + response = await client.get_registration(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_GetRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_get_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_get_registration_sync.py new file mode 100644 index 000000000000..1f05063199a0 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_get_registration_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_GetRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_get_registration(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.GetRegistrationRequest( + name="name_value", + ) + + # Make the request + response = client.get_registration(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_GetRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_list_registrations_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_list_registrations_async.py new file mode 100644 index 000000000000..935036d8f2b7 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_list_registrations_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRegistrations +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ListRegistrations_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_list_registrations(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.ListRegistrationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_registrations(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END domains_v1_generated_Domains_ListRegistrations_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_list_registrations_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_list_registrations_sync.py new file mode 100644 index 000000000000..30d1f8576c0b --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_list_registrations_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRegistrations +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ListRegistrations_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_list_registrations(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.ListRegistrationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_registrations(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END domains_v1_generated_Domains_ListRegistrations_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_register_domain_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_register_domain_async.py new file mode 100644 index 000000000000..62d1fa4f3a49 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_register_domain_async.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RegisterDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RegisterDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_register_domain(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + registration = domains_v1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1.RegisterDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.register_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RegisterDomain_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_register_domain_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_register_domain_sync.py new file mode 100644 index 000000000000..e9ddd16970d8 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_register_domain_sync.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RegisterDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RegisterDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_register_domain(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + registration = domains_v1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1.RegisterDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.register_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RegisterDomain_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_reset_authorization_code_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_reset_authorization_code_async.py new file mode 100644 index 000000000000..c1c87d799db8 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_reset_authorization_code_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 ResetAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ResetAuthorizationCode_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_reset_authorization_code(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.ResetAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = await client.reset_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ResetAuthorizationCode_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_reset_authorization_code_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_reset_authorization_code_sync.py new file mode 100644 index 000000000000..985ce1b26228 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_reset_authorization_code_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 ResetAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_ResetAuthorizationCode_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_reset_authorization_code(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.ResetAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = client.reset_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_ResetAuthorizationCode_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_authorization_code_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_authorization_code_async.py new file mode 100644 index 000000000000..5e62fdfb5a74 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_authorization_code_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 RetrieveAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RetrieveAuthorizationCode_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_retrieve_authorization_code(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.RetrieveAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = await client.retrieve_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RetrieveAuthorizationCode_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_authorization_code_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_authorization_code_sync.py new file mode 100644 index 000000000000..b8976f40a01c --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_authorization_code_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 RetrieveAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RetrieveAuthorizationCode_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_retrieve_authorization_code(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.RetrieveAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = client.retrieve_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_register_parameters_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_register_parameters_async.py new file mode 100644 index 000000000000..416d8d023dee --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_register_parameters_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 RetrieveRegisterParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RetrieveRegisterParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_retrieve_register_parameters(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.RetrieveRegisterParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = await client.retrieve_register_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RetrieveRegisterParameters_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_register_parameters_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_register_parameters_sync.py new file mode 100644 index 000000000000..1195433a4a05 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_register_parameters_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 RetrieveRegisterParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RetrieveRegisterParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_retrieve_register_parameters(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.RetrieveRegisterParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = client.retrieve_register_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_transfer_parameters_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_transfer_parameters_async.py new file mode 100644 index 000000000000..7fbb86dd0dae --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_transfer_parameters_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 RetrieveTransferParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RetrieveTransferParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_retrieve_transfer_parameters(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.RetrieveTransferParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = await client.retrieve_transfer_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RetrieveTransferParameters_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_transfer_parameters_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_transfer_parameters_sync.py new file mode 100644 index 000000000000..5ed9f4c018ca --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_retrieve_transfer_parameters_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 RetrieveTransferParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_RetrieveTransferParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_retrieve_transfer_parameters(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.RetrieveTransferParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = client.retrieve_transfer_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_RetrieveTransferParameters_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_search_domains_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_search_domains_async.py new file mode 100644 index 000000000000..276f24ab7887 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_search_domains_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 SearchDomains +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_SearchDomains_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_search_domains(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.SearchDomainsRequest( + query="query_value", + location="location_value", + ) + + # Make the request + response = await client.search_domains(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_SearchDomains_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_search_domains_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_search_domains_sync.py new file mode 100644 index 000000000000..1ccb1f064f07 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_search_domains_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 SearchDomains +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_SearchDomains_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_search_domains(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.SearchDomainsRequest( + query="query_value", + location="location_value", + ) + + # Make the request + response = client.search_domains(request=request) + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_SearchDomains_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_transfer_domain_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_transfer_domain_async.py new file mode 100644 index 000000000000..cb5b2698e500 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_transfer_domain_async.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TransferDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_TransferDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_transfer_domain(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + registration = domains_v1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1.TransferDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.transfer_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_TransferDomain_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_transfer_domain_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_transfer_domain_sync.py new file mode 100644 index 000000000000..213561a10c5f --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_transfer_domain_sync.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TransferDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_TransferDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_transfer_domain(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + registration = domains_v1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1.TransferDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.transfer_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_TransferDomain_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_update_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_update_registration_async.py new file mode 100644 index 000000000000..47c24db068c9 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_update_registration_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 UpdateRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_UpdateRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +async def sample_update_registration(): + # Create a client + client = domains_v1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1.UpdateRegistrationRequest( + ) + + # Make the request + operation = client.update_registration(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_UpdateRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_update_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_update_registration_sync.py new file mode 100644 index 000000000000..471810959608 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1_generated_domains_update_registration_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 UpdateRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1_generated_Domains_UpdateRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1 + + +def sample_update_registration(): + # Create a client + client = domains_v1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1.UpdateRegistrationRequest( + ) + + # Make the request + operation = client.update_registration(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1_generated_Domains_UpdateRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_contact_settings_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_contact_settings_async.py new file mode 100644 index 000000000000..bb0437b2c526 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_contact_settings_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 ConfigureContactSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ConfigureContactSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_configure_contact_settings(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.ConfigureContactSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_contact_settings(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ConfigureContactSettings_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_contact_settings_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_contact_settings_sync.py new file mode 100644 index 000000000000..44fcfa80bd24 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_contact_settings_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 ConfigureContactSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ConfigureContactSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_configure_contact_settings(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.ConfigureContactSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_contact_settings(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ConfigureContactSettings_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_dns_settings_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_dns_settings_async.py new file mode 100644 index 000000000000..8a3996fb188e --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_dns_settings_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 ConfigureDnsSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ConfigureDnsSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_configure_dns_settings(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.ConfigureDnsSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_dns_settings(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ConfigureDnsSettings_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_dns_settings_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_dns_settings_sync.py new file mode 100644 index 000000000000..bc602c6bc9a3 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_dns_settings_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 ConfigureDnsSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ConfigureDnsSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_configure_dns_settings(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.ConfigureDnsSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_dns_settings(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ConfigureDnsSettings_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_management_settings_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_management_settings_async.py new file mode 100644 index 000000000000..58f01daa82fc --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_management_settings_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 ConfigureManagementSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ConfigureManagementSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_configure_management_settings(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.ConfigureManagementSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_management_settings(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ConfigureManagementSettings_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_management_settings_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_management_settings_sync.py new file mode 100644 index 000000000000..9ad8c8a271b1 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_configure_management_settings_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 ConfigureManagementSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ConfigureManagementSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_configure_management_settings(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.ConfigureManagementSettingsRequest( + registration="registration_value", + ) + + # Make the request + operation = client.configure_management_settings(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ConfigureManagementSettings_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_delete_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_delete_registration_async.py new file mode 100644 index 000000000000..c1c7a425e3c7 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_delete_registration_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 DeleteRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_DeleteRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_delete_registration(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.DeleteRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_registration(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_DeleteRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_delete_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_delete_registration_sync.py new file mode 100644 index 000000000000..7a63afce6538 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_delete_registration_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 DeleteRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_DeleteRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_delete_registration(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.DeleteRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_registration(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_DeleteRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_export_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_export_registration_async.py new file mode 100644 index 000000000000..72f9e71058aa --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_export_registration_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 ExportRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ExportRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_export_registration(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.ExportRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.export_registration(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ExportRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_export_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_export_registration_sync.py new file mode 100644 index 000000000000..1c501b016025 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_export_registration_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 ExportRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ExportRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_export_registration(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.ExportRegistrationRequest( + name="name_value", + ) + + # Make the request + operation = client.export_registration(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ExportRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_get_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_get_registration_async.py new file mode 100644 index 000000000000..75c18bd00ded --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_get_registration_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_GetRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_get_registration(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.GetRegistrationRequest( + name="name_value", + ) + + # Make the request + response = await client.get_registration(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_GetRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_get_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_get_registration_sync.py new file mode 100644 index 000000000000..e92a14e519d6 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_get_registration_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_GetRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_get_registration(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.GetRegistrationRequest( + name="name_value", + ) + + # Make the request + response = client.get_registration(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_GetRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_list_registrations_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_list_registrations_async.py new file mode 100644 index 000000000000..86667eb63a32 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_list_registrations_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRegistrations +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ListRegistrations_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_list_registrations(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.ListRegistrationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_registrations(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END domains_v1beta1_generated_Domains_ListRegistrations_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_list_registrations_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_list_registrations_sync.py new file mode 100644 index 000000000000..d16b07b10282 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_list_registrations_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRegistrations +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ListRegistrations_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_list_registrations(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.ListRegistrationsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_registrations(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END domains_v1beta1_generated_Domains_ListRegistrations_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_register_domain_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_register_domain_async.py new file mode 100644 index 000000000000..3c198ed47ddf --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_register_domain_async.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RegisterDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RegisterDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_register_domain(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + registration = domains_v1beta1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1beta1.RegisterDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.register_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RegisterDomain_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_register_domain_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_register_domain_sync.py new file mode 100644 index 000000000000..f8847307291c --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_register_domain_sync.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RegisterDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RegisterDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_register_domain(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + registration = domains_v1beta1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1beta1.RegisterDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.register_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RegisterDomain_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_reset_authorization_code_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_reset_authorization_code_async.py new file mode 100644 index 000000000000..975b01de17d7 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_reset_authorization_code_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 ResetAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ResetAuthorizationCode_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_reset_authorization_code(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.ResetAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = await client.reset_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ResetAuthorizationCode_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_reset_authorization_code_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_reset_authorization_code_sync.py new file mode 100644 index 000000000000..27d4d98ce4fa --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_reset_authorization_code_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 ResetAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_ResetAuthorizationCode_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_reset_authorization_code(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.ResetAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = client.reset_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_ResetAuthorizationCode_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_authorization_code_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_authorization_code_async.py new file mode 100644 index 000000000000..b34393e02b2c --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_authorization_code_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 RetrieveAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_retrieve_authorization_code(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.RetrieveAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = await client.retrieve_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_authorization_code_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_authorization_code_sync.py new file mode 100644 index 000000000000..f3c6a9da4bf8 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_authorization_code_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 RetrieveAuthorizationCode +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_retrieve_authorization_code(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.RetrieveAuthorizationCodeRequest( + registration="registration_value", + ) + + # Make the request + response = client.retrieve_authorization_code(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_register_parameters_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_register_parameters_async.py new file mode 100644 index 000000000000..20cab05e3ed6 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_register_parameters_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 RetrieveRegisterParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RetrieveRegisterParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_retrieve_register_parameters(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.RetrieveRegisterParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = await client.retrieve_register_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RetrieveRegisterParameters_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_register_parameters_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_register_parameters_sync.py new file mode 100644 index 000000000000..2a84363ca52e --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_register_parameters_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 RetrieveRegisterParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RetrieveRegisterParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_retrieve_register_parameters(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.RetrieveRegisterParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = client.retrieve_register_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_transfer_parameters_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_transfer_parameters_async.py new file mode 100644 index 000000000000..782911a9aec2 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_transfer_parameters_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 RetrieveTransferParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RetrieveTransferParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_retrieve_transfer_parameters(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.RetrieveTransferParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = await client.retrieve_transfer_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RetrieveTransferParameters_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_transfer_parameters_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_transfer_parameters_sync.py new file mode 100644 index 000000000000..47d7e44c1dd4 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_retrieve_transfer_parameters_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 RetrieveTransferParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_RetrieveTransferParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_retrieve_transfer_parameters(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.RetrieveTransferParametersRequest( + domain_name="domain_name_value", + location="location_value", + ) + + # Make the request + response = client.retrieve_transfer_parameters(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_RetrieveTransferParameters_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_search_domains_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_search_domains_async.py new file mode 100644 index 000000000000..13021afc649e --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_search_domains_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 SearchDomains +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_SearchDomains_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_search_domains(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.SearchDomainsRequest( + query="query_value", + location="location_value", + ) + + # Make the request + response = await client.search_domains(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_SearchDomains_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_search_domains_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_search_domains_sync.py new file mode 100644 index 000000000000..bbaa28a5b230 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_search_domains_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 SearchDomains +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_SearchDomains_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_search_domains(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.SearchDomainsRequest( + query="query_value", + location="location_value", + ) + + # Make the request + response = client.search_domains(request=request) + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_SearchDomains_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_transfer_domain_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_transfer_domain_async.py new file mode 100644 index 000000000000..f63c76ccd7f1 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_transfer_domain_async.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TransferDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_TransferDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_transfer_domain(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + registration = domains_v1beta1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1beta1.TransferDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.transfer_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_TransferDomain_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_transfer_domain_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_transfer_domain_sync.py new file mode 100644 index 000000000000..d406addad901 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_transfer_domain_sync.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TransferDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_TransferDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_transfer_domain(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + registration = domains_v1beta1.Registration() + registration.domain_name = "domain_name_value" + registration.contact_settings.privacy = "REDACTED_CONTACT_DATA" + registration.contact_settings.registrant_contact.email = "email_value" + registration.contact_settings.registrant_contact.phone_number = "phone_number_value" + registration.contact_settings.admin_contact.email = "email_value" + registration.contact_settings.admin_contact.phone_number = "phone_number_value" + registration.contact_settings.technical_contact.email = "email_value" + registration.contact_settings.technical_contact.phone_number = "phone_number_value" + + request = domains_v1beta1.TransferDomainRequest( + parent="parent_value", + registration=registration, + ) + + # Make the request + operation = client.transfer_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_TransferDomain_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_update_registration_async.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_update_registration_async.py new file mode 100644 index 000000000000..2808bff4b105 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_update_registration_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 UpdateRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_UpdateRegistration_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +async def sample_update_registration(): + # Create a client + client = domains_v1beta1.DomainsAsyncClient() + + # Initialize request argument(s) + request = domains_v1beta1.UpdateRegistrationRequest( + ) + + # Make the request + operation = client.update_registration(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_UpdateRegistration_async] diff --git a/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_update_registration_sync.py b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_update_registration_sync.py new file mode 100644 index 000000000000..28f855977cc7 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/domains_v1beta1_generated_domains_update_registration_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 UpdateRegistration +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-domains + + +# [START domains_v1beta1_generated_Domains_UpdateRegistration_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import domains_v1beta1 + + +def sample_update_registration(): + # Create a client + client = domains_v1beta1.DomainsClient() + + # Initialize request argument(s) + request = domains_v1beta1.UpdateRegistrationRequest( + ) + + # Make the request + operation = client.update_registration(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END domains_v1beta1_generated_Domains_UpdateRegistration_sync] diff --git a/packages/google-cloud-domains/samples/generated_samples/snippet_metadata_google.cloud.domains.v1.json b/packages/google-cloud-domains/samples/generated_samples/snippet_metadata_google.cloud.domains.v1.json new file mode 100644 index 000000000000..5384077f78bd --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/snippet_metadata_google.cloud.domains.v1.json @@ -0,0 +1,2550 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.domains.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-domains", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.configure_contact_settings", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ConfigureContactSettings", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureContactSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ConfigureContactSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "contact_settings", + "type": "google.cloud.domains_v1.types.ContactSettings" + }, + { + "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": "configure_contact_settings" + }, + "description": "Sample for ConfigureContactSettings", + "file": "domains_v1_generated_domains_configure_contact_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ConfigureContactSettings_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": "domains_v1_generated_domains_configure_contact_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.configure_contact_settings", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ConfigureContactSettings", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureContactSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ConfigureContactSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "contact_settings", + "type": "google.cloud.domains_v1.types.ContactSettings" + }, + { + "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": "configure_contact_settings" + }, + "description": "Sample for ConfigureContactSettings", + "file": "domains_v1_generated_domains_configure_contact_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ConfigureContactSettings_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": "domains_v1_generated_domains_configure_contact_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.configure_dns_settings", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ConfigureDnsSettings", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureDnsSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ConfigureDnsSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "dns_settings", + "type": "google.cloud.domains_v1.types.DnsSettings" + }, + { + "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": "configure_dns_settings" + }, + "description": "Sample for ConfigureDnsSettings", + "file": "domains_v1_generated_domains_configure_dns_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ConfigureDnsSettings_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": "domains_v1_generated_domains_configure_dns_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.configure_dns_settings", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ConfigureDnsSettings", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureDnsSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ConfigureDnsSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "dns_settings", + "type": "google.cloud.domains_v1.types.DnsSettings" + }, + { + "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": "configure_dns_settings" + }, + "description": "Sample for ConfigureDnsSettings", + "file": "domains_v1_generated_domains_configure_dns_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ConfigureDnsSettings_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": "domains_v1_generated_domains_configure_dns_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.configure_management_settings", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ConfigureManagementSettings", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureManagementSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ConfigureManagementSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "management_settings", + "type": "google.cloud.domains_v1.types.ManagementSettings" + }, + { + "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": "configure_management_settings" + }, + "description": "Sample for ConfigureManagementSettings", + "file": "domains_v1_generated_domains_configure_management_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ConfigureManagementSettings_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": "domains_v1_generated_domains_configure_management_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.configure_management_settings", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ConfigureManagementSettings", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureManagementSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ConfigureManagementSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "management_settings", + "type": "google.cloud.domains_v1.types.ManagementSettings" + }, + { + "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": "configure_management_settings" + }, + "description": "Sample for ConfigureManagementSettings", + "file": "domains_v1_generated_domains_configure_management_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ConfigureManagementSettings_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": "domains_v1_generated_domains_configure_management_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.delete_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.DeleteRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "DeleteRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.DeleteRegistrationRequest" + }, + { + "name": "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_registration" + }, + "description": "Sample for DeleteRegistration", + "file": "domains_v1_generated_domains_delete_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_DeleteRegistration_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": "domains_v1_generated_domains_delete_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.delete_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.DeleteRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "DeleteRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.DeleteRegistrationRequest" + }, + { + "name": "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_registration" + }, + "description": "Sample for DeleteRegistration", + "file": "domains_v1_generated_domains_delete_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_DeleteRegistration_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": "domains_v1_generated_domains_delete_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.export_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ExportRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ExportRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ExportRegistrationRequest" + }, + { + "name": "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": "export_registration" + }, + "description": "Sample for ExportRegistration", + "file": "domains_v1_generated_domains_export_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ExportRegistration_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": "domains_v1_generated_domains_export_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.export_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ExportRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ExportRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ExportRegistrationRequest" + }, + { + "name": "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": "export_registration" + }, + "description": "Sample for ExportRegistration", + "file": "domains_v1_generated_domains_export_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ExportRegistration_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": "domains_v1_generated_domains_export_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.get_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.GetRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "GetRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.GetRegistrationRequest" + }, + { + "name": "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.domains_v1.types.Registration", + "shortName": "get_registration" + }, + "description": "Sample for GetRegistration", + "file": "domains_v1_generated_domains_get_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_GetRegistration_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": "domains_v1_generated_domains_get_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.get_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.GetRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "GetRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.GetRegistrationRequest" + }, + { + "name": "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.domains_v1.types.Registration", + "shortName": "get_registration" + }, + "description": "Sample for GetRegistration", + "file": "domains_v1_generated_domains_get_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_GetRegistration_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": "domains_v1_generated_domains_get_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.list_registrations", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ListRegistrations", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ListRegistrations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ListRegistrationsRequest" + }, + { + "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.domains_v1.services.domains.pagers.ListRegistrationsAsyncPager", + "shortName": "list_registrations" + }, + "description": "Sample for ListRegistrations", + "file": "domains_v1_generated_domains_list_registrations_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ListRegistrations_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": "domains_v1_generated_domains_list_registrations_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.list_registrations", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ListRegistrations", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ListRegistrations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ListRegistrationsRequest" + }, + { + "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.domains_v1.services.domains.pagers.ListRegistrationsPager", + "shortName": "list_registrations" + }, + "description": "Sample for ListRegistrations", + "file": "domains_v1_generated_domains_list_registrations_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ListRegistrations_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": "domains_v1_generated_domains_list_registrations_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.register_domain", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RegisterDomain", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RegisterDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RegisterDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "register_domain" + }, + "description": "Sample for RegisterDomain", + "file": "domains_v1_generated_domains_register_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RegisterDomain_async", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1_generated_domains_register_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.register_domain", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RegisterDomain", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RegisterDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RegisterDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "register_domain" + }, + "description": "Sample for RegisterDomain", + "file": "domains_v1_generated_domains_register_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RegisterDomain_sync", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1_generated_domains_register_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.reset_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ResetAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ResetAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ResetAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1.types.AuthorizationCode", + "shortName": "reset_authorization_code" + }, + "description": "Sample for ResetAuthorizationCode", + "file": "domains_v1_generated_domains_reset_authorization_code_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ResetAuthorizationCode_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": "domains_v1_generated_domains_reset_authorization_code_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.reset_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1.Domains.ResetAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "ResetAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.ResetAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1.types.AuthorizationCode", + "shortName": "reset_authorization_code" + }, + "description": "Sample for ResetAuthorizationCode", + "file": "domains_v1_generated_domains_reset_authorization_code_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_ResetAuthorizationCode_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": "domains_v1_generated_domains_reset_authorization_code_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.retrieve_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RetrieveAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RetrieveAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1.types.AuthorizationCode", + "shortName": "retrieve_authorization_code" + }, + "description": "Sample for RetrieveAuthorizationCode", + "file": "domains_v1_generated_domains_retrieve_authorization_code_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RetrieveAuthorizationCode_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": "domains_v1_generated_domains_retrieve_authorization_code_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.retrieve_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RetrieveAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RetrieveAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1.types.AuthorizationCode", + "shortName": "retrieve_authorization_code" + }, + "description": "Sample for RetrieveAuthorizationCode", + "file": "domains_v1_generated_domains_retrieve_authorization_code_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RetrieveAuthorizationCode_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": "domains_v1_generated_domains_retrieve_authorization_code_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.retrieve_register_parameters", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RetrieveRegisterParameters", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveRegisterParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RetrieveRegisterParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1.types.RetrieveRegisterParametersResponse", + "shortName": "retrieve_register_parameters" + }, + "description": "Sample for RetrieveRegisterParameters", + "file": "domains_v1_generated_domains_retrieve_register_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RetrieveRegisterParameters_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": "domains_v1_generated_domains_retrieve_register_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.retrieve_register_parameters", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RetrieveRegisterParameters", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveRegisterParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RetrieveRegisterParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1.types.RetrieveRegisterParametersResponse", + "shortName": "retrieve_register_parameters" + }, + "description": "Sample for RetrieveRegisterParameters", + "file": "domains_v1_generated_domains_retrieve_register_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RetrieveRegisterParameters_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": "domains_v1_generated_domains_retrieve_register_parameters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.retrieve_transfer_parameters", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RetrieveTransferParameters", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveTransferParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RetrieveTransferParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1.types.RetrieveTransferParametersResponse", + "shortName": "retrieve_transfer_parameters" + }, + "description": "Sample for RetrieveTransferParameters", + "file": "domains_v1_generated_domains_retrieve_transfer_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RetrieveTransferParameters_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": "domains_v1_generated_domains_retrieve_transfer_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.retrieve_transfer_parameters", + "method": { + "fullName": "google.cloud.domains.v1.Domains.RetrieveTransferParameters", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveTransferParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.RetrieveTransferParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1.types.RetrieveTransferParametersResponse", + "shortName": "retrieve_transfer_parameters" + }, + "description": "Sample for RetrieveTransferParameters", + "file": "domains_v1_generated_domains_retrieve_transfer_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_RetrieveTransferParameters_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": "domains_v1_generated_domains_retrieve_transfer_parameters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.search_domains", + "method": { + "fullName": "google.cloud.domains.v1.Domains.SearchDomains", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "SearchDomains" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.SearchDomainsRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1.types.SearchDomainsResponse", + "shortName": "search_domains" + }, + "description": "Sample for SearchDomains", + "file": "domains_v1_generated_domains_search_domains_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_SearchDomains_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": "domains_v1_generated_domains_search_domains_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.search_domains", + "method": { + "fullName": "google.cloud.domains.v1.Domains.SearchDomains", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "SearchDomains" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.SearchDomainsRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1.types.SearchDomainsResponse", + "shortName": "search_domains" + }, + "description": "Sample for SearchDomains", + "file": "domains_v1_generated_domains_search_domains_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_SearchDomains_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": "domains_v1_generated_domains_search_domains_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.transfer_domain", + "method": { + "fullName": "google.cloud.domains.v1.Domains.TransferDomain", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "TransferDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.TransferDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "authorization_code", + "type": "google.cloud.domains_v1.types.AuthorizationCode" + }, + { + "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": "transfer_domain" + }, + "description": "Sample for TransferDomain", + "file": "domains_v1_generated_domains_transfer_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_TransferDomain_async", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1_generated_domains_transfer_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.transfer_domain", + "method": { + "fullName": "google.cloud.domains.v1.Domains.TransferDomain", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "TransferDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.TransferDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "authorization_code", + "type": "google.cloud.domains_v1.types.AuthorizationCode" + }, + { + "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": "transfer_domain" + }, + "description": "Sample for TransferDomain", + "file": "domains_v1_generated_domains_transfer_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_TransferDomain_sync", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1_generated_domains_transfer_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1.DomainsAsyncClient.update_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.UpdateRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "UpdateRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.UpdateRegistrationRequest" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1.types.Registration" + }, + { + "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_registration" + }, + "description": "Sample for UpdateRegistration", + "file": "domains_v1_generated_domains_update_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_UpdateRegistration_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": "domains_v1_generated_domains_update_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1.DomainsClient.update_registration", + "method": { + "fullName": "google.cloud.domains.v1.Domains.UpdateRegistration", + "service": { + "fullName": "google.cloud.domains.v1.Domains", + "shortName": "Domains" + }, + "shortName": "UpdateRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1.types.UpdateRegistrationRequest" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1.types.Registration" + }, + { + "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_registration" + }, + "description": "Sample for UpdateRegistration", + "file": "domains_v1_generated_domains_update_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1_generated_Domains_UpdateRegistration_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": "domains_v1_generated_domains_update_registration_sync.py" + } + ] +} diff --git a/packages/google-cloud-domains/samples/generated_samples/snippet_metadata_google.cloud.domains.v1beta1.json b/packages/google-cloud-domains/samples/generated_samples/snippet_metadata_google.cloud.domains.v1beta1.json new file mode 100644 index 000000000000..7634af9e4008 --- /dev/null +++ b/packages/google-cloud-domains/samples/generated_samples/snippet_metadata_google.cloud.domains.v1beta1.json @@ -0,0 +1,2550 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.domains.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-domains", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.configure_contact_settings", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ConfigureContactSettings", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureContactSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ConfigureContactSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "contact_settings", + "type": "google.cloud.domains_v1beta1.types.ContactSettings" + }, + { + "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": "configure_contact_settings" + }, + "description": "Sample for ConfigureContactSettings", + "file": "domains_v1beta1_generated_domains_configure_contact_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ConfigureContactSettings_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": "domains_v1beta1_generated_domains_configure_contact_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.configure_contact_settings", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ConfigureContactSettings", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureContactSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ConfigureContactSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "contact_settings", + "type": "google.cloud.domains_v1beta1.types.ContactSettings" + }, + { + "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": "configure_contact_settings" + }, + "description": "Sample for ConfigureContactSettings", + "file": "domains_v1beta1_generated_domains_configure_contact_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ConfigureContactSettings_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": "domains_v1beta1_generated_domains_configure_contact_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.configure_dns_settings", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ConfigureDnsSettings", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureDnsSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ConfigureDnsSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "dns_settings", + "type": "google.cloud.domains_v1beta1.types.DnsSettings" + }, + { + "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": "configure_dns_settings" + }, + "description": "Sample for ConfigureDnsSettings", + "file": "domains_v1beta1_generated_domains_configure_dns_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ConfigureDnsSettings_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": "domains_v1beta1_generated_domains_configure_dns_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.configure_dns_settings", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ConfigureDnsSettings", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureDnsSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ConfigureDnsSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "dns_settings", + "type": "google.cloud.domains_v1beta1.types.DnsSettings" + }, + { + "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": "configure_dns_settings" + }, + "description": "Sample for ConfigureDnsSettings", + "file": "domains_v1beta1_generated_domains_configure_dns_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ConfigureDnsSettings_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": "domains_v1beta1_generated_domains_configure_dns_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.configure_management_settings", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ConfigureManagementSettings", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureManagementSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ConfigureManagementSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "management_settings", + "type": "google.cloud.domains_v1beta1.types.ManagementSettings" + }, + { + "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": "configure_management_settings" + }, + "description": "Sample for ConfigureManagementSettings", + "file": "domains_v1beta1_generated_domains_configure_management_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ConfigureManagementSettings_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": "domains_v1beta1_generated_domains_configure_management_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.configure_management_settings", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ConfigureManagementSettings", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ConfigureManagementSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ConfigureManagementSettingsRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "management_settings", + "type": "google.cloud.domains_v1beta1.types.ManagementSettings" + }, + { + "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": "configure_management_settings" + }, + "description": "Sample for ConfigureManagementSettings", + "file": "domains_v1beta1_generated_domains_configure_management_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ConfigureManagementSettings_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": "domains_v1beta1_generated_domains_configure_management_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.delete_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.DeleteRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "DeleteRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.DeleteRegistrationRequest" + }, + { + "name": "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_registration" + }, + "description": "Sample for DeleteRegistration", + "file": "domains_v1beta1_generated_domains_delete_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_DeleteRegistration_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": "domains_v1beta1_generated_domains_delete_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.delete_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.DeleteRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "DeleteRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.DeleteRegistrationRequest" + }, + { + "name": "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_registration" + }, + "description": "Sample for DeleteRegistration", + "file": "domains_v1beta1_generated_domains_delete_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_DeleteRegistration_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": "domains_v1beta1_generated_domains_delete_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.export_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ExportRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ExportRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ExportRegistrationRequest" + }, + { + "name": "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": "export_registration" + }, + "description": "Sample for ExportRegistration", + "file": "domains_v1beta1_generated_domains_export_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ExportRegistration_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": "domains_v1beta1_generated_domains_export_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.export_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ExportRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ExportRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ExportRegistrationRequest" + }, + { + "name": "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": "export_registration" + }, + "description": "Sample for ExportRegistration", + "file": "domains_v1beta1_generated_domains_export_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ExportRegistration_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": "domains_v1beta1_generated_domains_export_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.get_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.GetRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "GetRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.GetRegistrationRequest" + }, + { + "name": "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.domains_v1beta1.types.Registration", + "shortName": "get_registration" + }, + "description": "Sample for GetRegistration", + "file": "domains_v1beta1_generated_domains_get_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_GetRegistration_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": "domains_v1beta1_generated_domains_get_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.get_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.GetRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "GetRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.GetRegistrationRequest" + }, + { + "name": "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.domains_v1beta1.types.Registration", + "shortName": "get_registration" + }, + "description": "Sample for GetRegistration", + "file": "domains_v1beta1_generated_domains_get_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_GetRegistration_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": "domains_v1beta1_generated_domains_get_registration_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.list_registrations", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ListRegistrations", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ListRegistrations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ListRegistrationsRequest" + }, + { + "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.domains_v1beta1.services.domains.pagers.ListRegistrationsAsyncPager", + "shortName": "list_registrations" + }, + "description": "Sample for ListRegistrations", + "file": "domains_v1beta1_generated_domains_list_registrations_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ListRegistrations_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": "domains_v1beta1_generated_domains_list_registrations_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.list_registrations", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ListRegistrations", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ListRegistrations" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ListRegistrationsRequest" + }, + { + "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.domains_v1beta1.services.domains.pagers.ListRegistrationsPager", + "shortName": "list_registrations" + }, + "description": "Sample for ListRegistrations", + "file": "domains_v1beta1_generated_domains_list_registrations_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ListRegistrations_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": "domains_v1beta1_generated_domains_list_registrations_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.register_domain", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RegisterDomain", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RegisterDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RegisterDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1beta1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "register_domain" + }, + "description": "Sample for RegisterDomain", + "file": "domains_v1beta1_generated_domains_register_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RegisterDomain_async", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1beta1_generated_domains_register_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.register_domain", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RegisterDomain", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RegisterDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RegisterDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1beta1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "register_domain" + }, + "description": "Sample for RegisterDomain", + "file": "domains_v1beta1_generated_domains_register_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RegisterDomain_sync", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1beta1_generated_domains_register_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.reset_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ResetAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ResetAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ResetAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1beta1.types.AuthorizationCode", + "shortName": "reset_authorization_code" + }, + "description": "Sample for ResetAuthorizationCode", + "file": "domains_v1beta1_generated_domains_reset_authorization_code_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ResetAuthorizationCode_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": "domains_v1beta1_generated_domains_reset_authorization_code_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.reset_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.ResetAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "ResetAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.ResetAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1beta1.types.AuthorizationCode", + "shortName": "reset_authorization_code" + }, + "description": "Sample for ResetAuthorizationCode", + "file": "domains_v1beta1_generated_domains_reset_authorization_code_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_ResetAuthorizationCode_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": "domains_v1beta1_generated_domains_reset_authorization_code_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.retrieve_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RetrieveAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RetrieveAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1beta1.types.AuthorizationCode", + "shortName": "retrieve_authorization_code" + }, + "description": "Sample for RetrieveAuthorizationCode", + "file": "domains_v1beta1_generated_domains_retrieve_authorization_code_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_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": "domains_v1beta1_generated_domains_retrieve_authorization_code_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.retrieve_authorization_code", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RetrieveAuthorizationCode", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveAuthorizationCode" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RetrieveAuthorizationCodeRequest" + }, + { + "name": "registration", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1beta1.types.AuthorizationCode", + "shortName": "retrieve_authorization_code" + }, + "description": "Sample for RetrieveAuthorizationCode", + "file": "domains_v1beta1_generated_domains_retrieve_authorization_code_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_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": "domains_v1beta1_generated_domains_retrieve_authorization_code_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.retrieve_register_parameters", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RetrieveRegisterParameters", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveRegisterParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RetrieveRegisterParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1beta1.types.RetrieveRegisterParametersResponse", + "shortName": "retrieve_register_parameters" + }, + "description": "Sample for RetrieveRegisterParameters", + "file": "domains_v1beta1_generated_domains_retrieve_register_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RetrieveRegisterParameters_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": "domains_v1beta1_generated_domains_retrieve_register_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.retrieve_register_parameters", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RetrieveRegisterParameters", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveRegisterParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RetrieveRegisterParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1beta1.types.RetrieveRegisterParametersResponse", + "shortName": "retrieve_register_parameters" + }, + "description": "Sample for RetrieveRegisterParameters", + "file": "domains_v1beta1_generated_domains_retrieve_register_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RetrieveRegisterParameters_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": "domains_v1beta1_generated_domains_retrieve_register_parameters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.retrieve_transfer_parameters", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RetrieveTransferParameters", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveTransferParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RetrieveTransferParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1beta1.types.RetrieveTransferParametersResponse", + "shortName": "retrieve_transfer_parameters" + }, + "description": "Sample for RetrieveTransferParameters", + "file": "domains_v1beta1_generated_domains_retrieve_transfer_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RetrieveTransferParameters_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": "domains_v1beta1_generated_domains_retrieve_transfer_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.retrieve_transfer_parameters", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.RetrieveTransferParameters", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "RetrieveTransferParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.RetrieveTransferParametersRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "domain_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.domains_v1beta1.types.RetrieveTransferParametersResponse", + "shortName": "retrieve_transfer_parameters" + }, + "description": "Sample for RetrieveTransferParameters", + "file": "domains_v1beta1_generated_domains_retrieve_transfer_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_RetrieveTransferParameters_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": "domains_v1beta1_generated_domains_retrieve_transfer_parameters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.search_domains", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.SearchDomains", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "SearchDomains" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.SearchDomainsRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1beta1.types.SearchDomainsResponse", + "shortName": "search_domains" + }, + "description": "Sample for SearchDomains", + "file": "domains_v1beta1_generated_domains_search_domains_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_SearchDomains_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": "domains_v1beta1_generated_domains_search_domains_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.search_domains", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.SearchDomains", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "SearchDomains" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.SearchDomainsRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.domains_v1beta1.types.SearchDomainsResponse", + "shortName": "search_domains" + }, + "description": "Sample for SearchDomains", + "file": "domains_v1beta1_generated_domains_search_domains_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_SearchDomains_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": "domains_v1beta1_generated_domains_search_domains_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.transfer_domain", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.TransferDomain", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "TransferDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.TransferDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1beta1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "authorization_code", + "type": "google.cloud.domains_v1beta1.types.AuthorizationCode" + }, + { + "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": "transfer_domain" + }, + "description": "Sample for TransferDomain", + "file": "domains_v1beta1_generated_domains_transfer_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_TransferDomain_async", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1beta1_generated_domains_transfer_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.transfer_domain", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.TransferDomain", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "TransferDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.TransferDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1beta1.types.Registration" + }, + { + "name": "yearly_price", + "type": "google.type.money_pb2.Money" + }, + { + "name": "authorization_code", + "type": "google.cloud.domains_v1beta1.types.AuthorizationCode" + }, + { + "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": "transfer_domain" + }, + "description": "Sample for TransferDomain", + "file": "domains_v1beta1_generated_domains_transfer_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_TransferDomain_sync", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "domains_v1beta1_generated_domains_transfer_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient", + "shortName": "DomainsAsyncClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsAsyncClient.update_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.UpdateRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "UpdateRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.UpdateRegistrationRequest" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1beta1.types.Registration" + }, + { + "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_registration" + }, + "description": "Sample for UpdateRegistration", + "file": "domains_v1beta1_generated_domains_update_registration_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_UpdateRegistration_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": "domains_v1beta1_generated_domains_update_registration_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.domains_v1beta1.DomainsClient", + "shortName": "DomainsClient" + }, + "fullName": "google.cloud.domains_v1beta1.DomainsClient.update_registration", + "method": { + "fullName": "google.cloud.domains.v1beta1.Domains.UpdateRegistration", + "service": { + "fullName": "google.cloud.domains.v1beta1.Domains", + "shortName": "Domains" + }, + "shortName": "UpdateRegistration" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.domains_v1beta1.types.UpdateRegistrationRequest" + }, + { + "name": "registration", + "type": "google.cloud.domains_v1beta1.types.Registration" + }, + { + "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_registration" + }, + "description": "Sample for UpdateRegistration", + "file": "domains_v1beta1_generated_domains_update_registration_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "domains_v1beta1_generated_Domains_UpdateRegistration_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": "domains_v1beta1_generated_domains_update_registration_sync.py" + } + ] +} diff --git a/packages/google-cloud-domains/tests/unit/gapic/domains_v1/test_domains.py b/packages/google-cloud-domains/tests/unit/gapic/domains_v1/test_domains.py index acb47a8049e6..19d5dcbd766e 100644 --- a/packages/google-cloud-domains/tests/unit/gapic/domains_v1/test_domains.py +++ b/packages/google-cloud-domains/tests/unit/gapic/domains_v1/test_domains.py @@ -2347,9 +2347,11 @@ async def test_list_registrations_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_registrations(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-domains/tests/unit/gapic/domains_v1beta1/test_domains.py b/packages/google-cloud-domains/tests/unit/gapic/domains_v1beta1/test_domains.py index 618b38d5f8e9..8e46a98393b2 100644 --- a/packages/google-cloud-domains/tests/unit/gapic/domains_v1beta1/test_domains.py +++ b/packages/google-cloud-domains/tests/unit/gapic/domains_v1beta1/test_domains.py @@ -2347,9 +2347,11 @@ async def test_list_registrations_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_registrations(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer/gapic_version.py b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer/gapic_version.py index f501366371c0..30274cc6e9dd 100644 --- a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer/gapic_version.py +++ b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/gapic_version.py b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/gapic_version.py index f501366371c0..30274cc6e9dd 100644 --- a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/gapic_version.py +++ b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py index 316dfc1b8318..6aa74d54537c 100644 --- a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py +++ b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py @@ -2644,7 +2644,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EdgeContainerAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/transports/rest.py b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/transports/rest.py index b7795c307a75..135758c6c34e 100644 --- a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/transports/rest.py +++ b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/transports/rest.py @@ -2704,7 +2704,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-edgecontainer/noxfile.py b/packages/google-cloud-edgecontainer/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-edgecontainer/noxfile.py +++ b/packages/google-cloud-edgecontainer/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-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py new file mode 100644 index 000000000000..91348aefbd03 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_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 CreateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_CreateCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_create_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + cluster = edgecontainer_v1.Cluster() + cluster.name = "name_value" + cluster.networking.cluster_ipv4_cidr_blocks = ['cluster_ipv4_cidr_blocks_value1', 'cluster_ipv4_cidr_blocks_value2'] + cluster.networking.services_ipv4_cidr_blocks = ['services_ipv4_cidr_blocks_value1', 'services_ipv4_cidr_blocks_value2'] + cluster.authorization.admin_users.username = "username_value" + + request = edgecontainer_v1.CreateClusterRequest( + parent="parent_value", + cluster_id="cluster_id_value", + cluster=cluster, + ) + + # Make the request + operation = client.create_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_CreateCluster_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_sync.py new file mode 100644 index 000000000000..695258a88850 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_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 CreateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_CreateCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_create_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + cluster = edgecontainer_v1.Cluster() + cluster.name = "name_value" + cluster.networking.cluster_ipv4_cidr_blocks = ['cluster_ipv4_cidr_blocks_value1', 'cluster_ipv4_cidr_blocks_value2'] + cluster.networking.services_ipv4_cidr_blocks = ['services_ipv4_cidr_blocks_value1', 'services_ipv4_cidr_blocks_value2'] + cluster.authorization.admin_users.username = "username_value" + + request = edgecontainer_v1.CreateClusterRequest( + parent="parent_value", + cluster_id="cluster_id_value", + cluster=cluster, + ) + + # Make the request + operation = client.create_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_CreateCluster_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py new file mode 100644 index 000000000000..23c97c3ec013 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_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 CreateNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_CreateNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_create_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + node_pool = edgecontainer_v1.NodePool() + node_pool.name = "name_value" + node_pool.node_count = 1070 + + request = edgecontainer_v1.CreateNodePoolRequest( + parent="parent_value", + node_pool_id="node_pool_id_value", + node_pool=node_pool, + ) + + # Make the request + operation = client.create_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_CreateNodePool_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_sync.py new file mode 100644 index 000000000000..798a0c46b404 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_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 CreateNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_CreateNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_create_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + node_pool = edgecontainer_v1.NodePool() + node_pool.name = "name_value" + node_pool.node_count = 1070 + + request = edgecontainer_v1.CreateNodePoolRequest( + parent="parent_value", + node_pool_id="node_pool_id_value", + node_pool=node_pool, + ) + + # Make the request + operation = client.create_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_CreateNodePool_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py new file mode 100644 index 000000000000..baf9ee5f4e0e --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_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 CreateVpnConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_CreateVpnConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_create_vpn_connection(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + vpn_connection = edgecontainer_v1.VpnConnection() + vpn_connection.name = "name_value" + + request = edgecontainer_v1.CreateVpnConnectionRequest( + parent="parent_value", + vpn_connection_id="vpn_connection_id_value", + vpn_connection=vpn_connection, + ) + + # Make the request + operation = client.create_vpn_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_CreateVpnConnection_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_sync.py new file mode 100644 index 000000000000..2e586596daed --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_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 CreateVpnConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_CreateVpnConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_create_vpn_connection(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + vpn_connection = edgecontainer_v1.VpnConnection() + vpn_connection.name = "name_value" + + request = edgecontainer_v1.CreateVpnConnectionRequest( + parent="parent_value", + vpn_connection_id="vpn_connection_id_value", + vpn_connection=vpn_connection, + ) + + # Make the request + operation = client.create_vpn_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_CreateVpnConnection_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py new file mode 100644 index 000000000000..3ae747cc47b4 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_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 DeleteCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_DeleteCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_delete_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.DeleteClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_DeleteCluster_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_sync.py new file mode 100644 index 000000000000..3c0a35068360 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_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 DeleteCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_DeleteCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_delete_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.DeleteClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_DeleteCluster_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py new file mode 100644 index 000000000000..fd60e726fd06 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_DeleteNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_delete_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.DeleteNodePoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_DeleteNodePool_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_sync.py new file mode 100644 index 000000000000..ed58839fba70 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_DeleteNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_delete_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.DeleteNodePoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_DeleteNodePool_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py new file mode 100644 index 000000000000..f1fb9c8dcec2 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_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 DeleteVpnConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_DeleteVpnConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_delete_vpn_connection(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.DeleteVpnConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_vpn_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_DeleteVpnConnection_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_sync.py new file mode 100644 index 000000000000..67a1fd245045 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_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 DeleteVpnConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_DeleteVpnConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_delete_vpn_connection(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.DeleteVpnConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_vpn_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_DeleteVpnConnection_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_generate_access_token_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_generate_access_token_async.py new file mode 100644 index 000000000000..f98c9d0ea515 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_generate_access_token_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 GenerateAccessToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GenerateAccessToken_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_generate_access_token(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GenerateAccessTokenRequest( + cluster="cluster_value", + ) + + # Make the request + response = await client.generate_access_token(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GenerateAccessToken_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_generate_access_token_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_generate_access_token_sync.py new file mode 100644 index 000000000000..6b29e61e4ab3 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_generate_access_token_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 GenerateAccessToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GenerateAccessToken_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_generate_access_token(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GenerateAccessTokenRequest( + cluster="cluster_value", + ) + + # Make the request + response = client.generate_access_token(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GenerateAccessToken_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_cluster_async.py new file mode 100644 index 000000000000..de9ccb3fae19 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_cluster_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 GetCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_get_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetClusterRequest( + name="name_value", + ) + + # Make the request + response = await client.get_cluster(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetCluster_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_cluster_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_cluster_sync.py new file mode 100644 index 000000000000..3fbac2e451b7 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_cluster_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 GetCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_get_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetClusterRequest( + name="name_value", + ) + + # Make the request + response = client.get_cluster(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetCluster_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_machine_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_machine_async.py new file mode 100644 index 000000000000..2efeff191e7d --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_machine_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 GetMachine +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetMachine_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_get_machine(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetMachineRequest( + name="name_value", + ) + + # Make the request + response = await client.get_machine(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetMachine_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_machine_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_machine_sync.py new file mode 100644 index 000000000000..e4ad101e43f5 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_machine_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 GetMachine +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetMachine_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_get_machine(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetMachineRequest( + name="name_value", + ) + + # Make the request + response = client.get_machine(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetMachine_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_node_pool_async.py new file mode 100644 index 000000000000..5a31747c1c74 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_node_pool_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_get_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetNodePoolRequest( + name="name_value", + ) + + # Make the request + response = await client.get_node_pool(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetNodePool_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_node_pool_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_node_pool_sync.py new file mode 100644 index 000000000000..ef3c77372c41 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_node_pool_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_get_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetNodePoolRequest( + name="name_value", + ) + + # Make the request + response = client.get_node_pool(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetNodePool_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_vpn_connection_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_vpn_connection_async.py new file mode 100644 index 000000000000..788e65e1abcd --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_vpn_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 GetVpnConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetVpnConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_get_vpn_connection(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetVpnConnectionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_vpn_connection(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetVpnConnection_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_vpn_connection_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_vpn_connection_sync.py new file mode 100644 index 000000000000..32782f0f04ff --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_get_vpn_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 GetVpnConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_GetVpnConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_get_vpn_connection(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.GetVpnConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_vpn_connection(request=request) + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_GetVpnConnection_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_clusters_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_clusters_async.py new file mode 100644 index 000000000000..3cb0254cd5c1 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_clusters_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 ListClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListClusters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_list_clusters(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_clusters(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListClusters_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_clusters_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_clusters_sync.py new file mode 100644 index 000000000000..e4eefffcb326 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_clusters_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 ListClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListClusters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_list_clusters(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_clusters(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListClusters_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_machines_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_machines_async.py new file mode 100644 index 000000000000..441a4f8f8ceb --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_machines_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 ListMachines +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListMachines_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_list_machines(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListMachinesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_machines(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListMachines_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_machines_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_machines_sync.py new file mode 100644 index 000000000000..4df6258100b2 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_machines_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 ListMachines +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListMachines_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_list_machines(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListMachinesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_machines(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListMachines_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_node_pools_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_node_pools_async.py new file mode 100644 index 000000000000..1d2587dcd192 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_node_pools_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNodePools +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListNodePools_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_list_node_pools(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListNodePoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_node_pools(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListNodePools_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_node_pools_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_node_pools_sync.py new file mode 100644 index 000000000000..8980197e7e55 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_node_pools_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNodePools +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListNodePools_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_list_node_pools(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListNodePoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_node_pools(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListNodePools_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_vpn_connections_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_vpn_connections_async.py new file mode 100644 index 000000000000..9fb25a8ae222 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_vpn_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 ListVpnConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListVpnConnections_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_list_vpn_connections(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListVpnConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_vpn_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListVpnConnections_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_vpn_connections_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_vpn_connections_sync.py new file mode 100644 index 000000000000..49f255f0137a --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_list_vpn_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 ListVpnConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_ListVpnConnections_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_list_vpn_connections(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.ListVpnConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_vpn_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_ListVpnConnections_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py new file mode 100644 index 000000000000..876bc1c52193 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_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 UpdateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_UpdateCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_update_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.UpdateClusterRequest( + ) + + # Make the request + operation = client.update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_UpdateCluster_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_sync.py new file mode 100644 index 000000000000..30405f244499 --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_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 UpdateCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_UpdateCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_update_cluster(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.UpdateClusterRequest( + ) + + # Make the request + operation = client.update_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_UpdateCluster_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py new file mode 100644 index 000000000000..e4f8fe38ed7a --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_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 UpdateNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_UpdateNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +async def sample_update_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerAsyncClient() + + # Initialize request argument(s) + request = edgecontainer_v1.UpdateNodePoolRequest( + ) + + # Make the request + operation = client.update_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_UpdateNodePool_async] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_sync.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_sync.py new file mode 100644 index 000000000000..aa4046d281cb --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_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 UpdateNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-edgecontainer + + +# [START edgecontainer_v1_generated_EdgeContainer_UpdateNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import edgecontainer_v1 + + +def sample_update_node_pool(): + # Create a client + client = edgecontainer_v1.EdgeContainerClient() + + # Initialize request argument(s) + request = edgecontainer_v1.UpdateNodePoolRequest( + ) + + # Make the request + operation = client.update_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END edgecontainer_v1_generated_EdgeContainer_UpdateNodePool_sync] diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/snippet_metadata_google.cloud.edgecontainer.v1.json b/packages/google-cloud-edgecontainer/samples/generated_samples/snippet_metadata_google.cloud.edgecontainer.v1.json new file mode 100644 index 000000000000..523c75f1dabd --- /dev/null +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/snippet_metadata_google.cloud.edgecontainer.v1.json @@ -0,0 +1,2816 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.edgecontainer.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-edgecontainer", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.create_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.CreateCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "CreateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.CreateClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "cluster", + "type": "google.cloud.edgecontainer_v1.types.Cluster" + }, + { + "name": "cluster_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_cluster" + }, + "description": "Sample for CreateCluster", + "file": "edgecontainer_v1_generated_edge_container_create_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_CreateCluster_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": "edgecontainer_v1_generated_edge_container_create_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.create_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.CreateCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "CreateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.CreateClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "cluster", + "type": "google.cloud.edgecontainer_v1.types.Cluster" + }, + { + "name": "cluster_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_cluster" + }, + "description": "Sample for CreateCluster", + "file": "edgecontainer_v1_generated_edge_container_create_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_CreateCluster_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": "edgecontainer_v1_generated_edge_container_create_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.create_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.CreateNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "CreateNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.CreateNodePoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "node_pool", + "type": "google.cloud.edgecontainer_v1.types.NodePool" + }, + { + "name": "node_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_node_pool" + }, + "description": "Sample for CreateNodePool", + "file": "edgecontainer_v1_generated_edge_container_create_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_CreateNodePool_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": "edgecontainer_v1_generated_edge_container_create_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.create_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.CreateNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "CreateNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.CreateNodePoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "node_pool", + "type": "google.cloud.edgecontainer_v1.types.NodePool" + }, + { + "name": "node_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_node_pool" + }, + "description": "Sample for CreateNodePool", + "file": "edgecontainer_v1_generated_edge_container_create_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_CreateNodePool_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": "edgecontainer_v1_generated_edge_container_create_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.create_vpn_connection", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.CreateVpnConnection", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "CreateVpnConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.CreateVpnConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "vpn_connection", + "type": "google.cloud.edgecontainer_v1.types.VpnConnection" + }, + { + "name": "vpn_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_vpn_connection" + }, + "description": "Sample for CreateVpnConnection", + "file": "edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_CreateVpnConnection_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": "edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.create_vpn_connection", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.CreateVpnConnection", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "CreateVpnConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.CreateVpnConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "vpn_connection", + "type": "google.cloud.edgecontainer_v1.types.VpnConnection" + }, + { + "name": "vpn_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_vpn_connection" + }, + "description": "Sample for CreateVpnConnection", + "file": "edgecontainer_v1_generated_edge_container_create_vpn_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_CreateVpnConnection_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": "edgecontainer_v1_generated_edge_container_create_vpn_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.delete_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.DeleteCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "DeleteCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.DeleteClusterRequest" + }, + { + "name": "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_cluster" + }, + "description": "Sample for DeleteCluster", + "file": "edgecontainer_v1_generated_edge_container_delete_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_DeleteCluster_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": "edgecontainer_v1_generated_edge_container_delete_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.delete_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.DeleteCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "DeleteCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.DeleteClusterRequest" + }, + { + "name": "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_cluster" + }, + "description": "Sample for DeleteCluster", + "file": "edgecontainer_v1_generated_edge_container_delete_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_DeleteCluster_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": "edgecontainer_v1_generated_edge_container_delete_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.delete_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.DeleteNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "DeleteNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.DeleteNodePoolRequest" + }, + { + "name": "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_node_pool" + }, + "description": "Sample for DeleteNodePool", + "file": "edgecontainer_v1_generated_edge_container_delete_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_DeleteNodePool_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": "edgecontainer_v1_generated_edge_container_delete_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.delete_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.DeleteNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "DeleteNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.DeleteNodePoolRequest" + }, + { + "name": "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_node_pool" + }, + "description": "Sample for DeleteNodePool", + "file": "edgecontainer_v1_generated_edge_container_delete_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_DeleteNodePool_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": "edgecontainer_v1_generated_edge_container_delete_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.delete_vpn_connection", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.DeleteVpnConnection", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "DeleteVpnConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.DeleteVpnConnectionRequest" + }, + { + "name": "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_vpn_connection" + }, + "description": "Sample for DeleteVpnConnection", + "file": "edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_DeleteVpnConnection_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": "edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.delete_vpn_connection", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.DeleteVpnConnection", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "DeleteVpnConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.DeleteVpnConnectionRequest" + }, + { + "name": "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_vpn_connection" + }, + "description": "Sample for DeleteVpnConnection", + "file": "edgecontainer_v1_generated_edge_container_delete_vpn_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_DeleteVpnConnection_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": "edgecontainer_v1_generated_edge_container_delete_vpn_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.generate_access_token", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GenerateAccessToken", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GenerateAccessToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GenerateAccessTokenRequest" + }, + { + "name": "cluster", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.edgecontainer_v1.types.GenerateAccessTokenResponse", + "shortName": "generate_access_token" + }, + "description": "Sample for GenerateAccessToken", + "file": "edgecontainer_v1_generated_edge_container_generate_access_token_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GenerateAccessToken_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": "edgecontainer_v1_generated_edge_container_generate_access_token_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.generate_access_token", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GenerateAccessToken", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GenerateAccessToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GenerateAccessTokenRequest" + }, + { + "name": "cluster", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.edgecontainer_v1.types.GenerateAccessTokenResponse", + "shortName": "generate_access_token" + }, + "description": "Sample for GenerateAccessToken", + "file": "edgecontainer_v1_generated_edge_container_generate_access_token_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GenerateAccessToken_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": "edgecontainer_v1_generated_edge_container_generate_access_token_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.get_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetClusterRequest" + }, + { + "name": "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.edgecontainer_v1.types.Cluster", + "shortName": "get_cluster" + }, + "description": "Sample for GetCluster", + "file": "edgecontainer_v1_generated_edge_container_get_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetCluster_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": "edgecontainer_v1_generated_edge_container_get_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.get_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetClusterRequest" + }, + { + "name": "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.edgecontainer_v1.types.Cluster", + "shortName": "get_cluster" + }, + "description": "Sample for GetCluster", + "file": "edgecontainer_v1_generated_edge_container_get_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetCluster_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": "edgecontainer_v1_generated_edge_container_get_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.get_machine", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetMachine", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetMachine" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetMachineRequest" + }, + { + "name": "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.edgecontainer_v1.types.Machine", + "shortName": "get_machine" + }, + "description": "Sample for GetMachine", + "file": "edgecontainer_v1_generated_edge_container_get_machine_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetMachine_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": "edgecontainer_v1_generated_edge_container_get_machine_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.get_machine", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetMachine", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetMachine" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetMachineRequest" + }, + { + "name": "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.edgecontainer_v1.types.Machine", + "shortName": "get_machine" + }, + "description": "Sample for GetMachine", + "file": "edgecontainer_v1_generated_edge_container_get_machine_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetMachine_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": "edgecontainer_v1_generated_edge_container_get_machine_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.get_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetNodePoolRequest" + }, + { + "name": "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.edgecontainer_v1.types.NodePool", + "shortName": "get_node_pool" + }, + "description": "Sample for GetNodePool", + "file": "edgecontainer_v1_generated_edge_container_get_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetNodePool_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": "edgecontainer_v1_generated_edge_container_get_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.get_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetNodePoolRequest" + }, + { + "name": "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.edgecontainer_v1.types.NodePool", + "shortName": "get_node_pool" + }, + "description": "Sample for GetNodePool", + "file": "edgecontainer_v1_generated_edge_container_get_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetNodePool_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": "edgecontainer_v1_generated_edge_container_get_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.get_vpn_connection", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetVpnConnection", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetVpnConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetVpnConnectionRequest" + }, + { + "name": "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.edgecontainer_v1.types.VpnConnection", + "shortName": "get_vpn_connection" + }, + "description": "Sample for GetVpnConnection", + "file": "edgecontainer_v1_generated_edge_container_get_vpn_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetVpnConnection_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": "edgecontainer_v1_generated_edge_container_get_vpn_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.get_vpn_connection", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.GetVpnConnection", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "GetVpnConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.GetVpnConnectionRequest" + }, + { + "name": "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.edgecontainer_v1.types.VpnConnection", + "shortName": "get_vpn_connection" + }, + "description": "Sample for GetVpnConnection", + "file": "edgecontainer_v1_generated_edge_container_get_vpn_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_GetVpnConnection_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": "edgecontainer_v1_generated_edge_container_get_vpn_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.list_clusters", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListClusters", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListClustersRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListClustersAsyncPager", + "shortName": "list_clusters" + }, + "description": "Sample for ListClusters", + "file": "edgecontainer_v1_generated_edge_container_list_clusters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListClusters_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": "edgecontainer_v1_generated_edge_container_list_clusters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.list_clusters", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListClusters", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListClustersRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListClustersPager", + "shortName": "list_clusters" + }, + "description": "Sample for ListClusters", + "file": "edgecontainer_v1_generated_edge_container_list_clusters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListClusters_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": "edgecontainer_v1_generated_edge_container_list_clusters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.list_machines", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListMachines", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListMachines" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListMachinesRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListMachinesAsyncPager", + "shortName": "list_machines" + }, + "description": "Sample for ListMachines", + "file": "edgecontainer_v1_generated_edge_container_list_machines_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListMachines_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": "edgecontainer_v1_generated_edge_container_list_machines_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.list_machines", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListMachines", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListMachines" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListMachinesRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListMachinesPager", + "shortName": "list_machines" + }, + "description": "Sample for ListMachines", + "file": "edgecontainer_v1_generated_edge_container_list_machines_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListMachines_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": "edgecontainer_v1_generated_edge_container_list_machines_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.list_node_pools", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListNodePools", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListNodePools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListNodePoolsRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListNodePoolsAsyncPager", + "shortName": "list_node_pools" + }, + "description": "Sample for ListNodePools", + "file": "edgecontainer_v1_generated_edge_container_list_node_pools_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListNodePools_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": "edgecontainer_v1_generated_edge_container_list_node_pools_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.list_node_pools", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListNodePools", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListNodePools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListNodePoolsRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListNodePoolsPager", + "shortName": "list_node_pools" + }, + "description": "Sample for ListNodePools", + "file": "edgecontainer_v1_generated_edge_container_list_node_pools_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListNodePools_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": "edgecontainer_v1_generated_edge_container_list_node_pools_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.list_vpn_connections", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListVpnConnections", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListVpnConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListVpnConnectionsRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListVpnConnectionsAsyncPager", + "shortName": "list_vpn_connections" + }, + "description": "Sample for ListVpnConnections", + "file": "edgecontainer_v1_generated_edge_container_list_vpn_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListVpnConnections_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": "edgecontainer_v1_generated_edge_container_list_vpn_connections_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.list_vpn_connections", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.ListVpnConnections", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "ListVpnConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.ListVpnConnectionsRequest" + }, + { + "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.edgecontainer_v1.services.edge_container.pagers.ListVpnConnectionsPager", + "shortName": "list_vpn_connections" + }, + "description": "Sample for ListVpnConnections", + "file": "edgecontainer_v1_generated_edge_container_list_vpn_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_ListVpnConnections_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": "edgecontainer_v1_generated_edge_container_list_vpn_connections_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.update_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.UpdateCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "UpdateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.UpdateClusterRequest" + }, + { + "name": "cluster", + "type": "google.cloud.edgecontainer_v1.types.Cluster" + }, + { + "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_cluster" + }, + "description": "Sample for UpdateCluster", + "file": "edgecontainer_v1_generated_edge_container_update_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_UpdateCluster_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": "edgecontainer_v1_generated_edge_container_update_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.update_cluster", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.UpdateCluster", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "UpdateCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.UpdateClusterRequest" + }, + { + "name": "cluster", + "type": "google.cloud.edgecontainer_v1.types.Cluster" + }, + { + "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_cluster" + }, + "description": "Sample for UpdateCluster", + "file": "edgecontainer_v1_generated_edge_container_update_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_UpdateCluster_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": "edgecontainer_v1_generated_edge_container_update_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient", + "shortName": "EdgeContainerAsyncClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerAsyncClient.update_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.UpdateNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "UpdateNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.UpdateNodePoolRequest" + }, + { + "name": "node_pool", + "type": "google.cloud.edgecontainer_v1.types.NodePool" + }, + { + "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_node_pool" + }, + "description": "Sample for UpdateNodePool", + "file": "edgecontainer_v1_generated_edge_container_update_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_UpdateNodePool_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": "edgecontainer_v1_generated_edge_container_update_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient", + "shortName": "EdgeContainerClient" + }, + "fullName": "google.cloud.edgecontainer_v1.EdgeContainerClient.update_node_pool", + "method": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer.UpdateNodePool", + "service": { + "fullName": "google.cloud.edgecontainer.v1.EdgeContainer", + "shortName": "EdgeContainer" + }, + "shortName": "UpdateNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.edgecontainer_v1.types.UpdateNodePoolRequest" + }, + { + "name": "node_pool", + "type": "google.cloud.edgecontainer_v1.types.NodePool" + }, + { + "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_node_pool" + }, + "description": "Sample for UpdateNodePool", + "file": "edgecontainer_v1_generated_edge_container_update_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "edgecontainer_v1_generated_EdgeContainer_UpdateNodePool_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": "edgecontainer_v1_generated_edge_container_update_node_pool_sync.py" + } + ] +} diff --git a/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py b/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py index 700f94134eea..72e8da1bfe61 100644 --- a/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py +++ b/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py @@ -1134,9 +1134,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 @@ -2752,9 +2754,11 @@ async def test_list_node_pools_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_node_pools(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4124,9 +4128,11 @@ async def test_list_machines_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_machines(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 @@ -4810,9 +4816,11 @@ async def test_list_vpn_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_vpn_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-enterpriseknowledgegraph/CONTRIBUTING.rst b/packages/google-cloud-enterpriseknowledgegraph/CONTRIBUTING.rst index f507957b0887..3f06d7ed0069 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/CONTRIBUTING.rst +++ b/packages/google-cloud-enterpriseknowledgegraph/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-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph/gapic_version.py b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph/gapic_version.py +++ b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph/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-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/gapic_version.py b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/gapic_version.py index 553d98052667..30274cc6e9dd 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/gapic_version.py +++ b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/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-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/services/enterprise_knowledge_graph_service/async_client.py b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/services/enterprise_knowledge_graph_service/async_client.py index 8b88596abe96..843edc462e3f 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/services/enterprise_knowledge_graph_service/async_client.py +++ b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/services/enterprise_knowledge_graph_service/async_client.py @@ -1252,7 +1252,7 @@ async def sample_search_public_kg(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EnterpriseKnowledgeGraphServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-enterpriseknowledgegraph/noxfile.py b/packages/google-cloud-enterpriseknowledgegraph/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/noxfile.py +++ b/packages/google-cloud-enterpriseknowledgegraph/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-enterpriseknowledgegraph/samples/generated_samples/snippet_metadata_google.cloud.enterpriseknowledgegraph.v1.json b/packages/google-cloud-enterpriseknowledgegraph/samples/generated_samples/snippet_metadata_google.cloud.enterpriseknowledgegraph.v1.json index 1ca25b3e7f26..ada6b2e84d57 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/samples/generated_samples/snippet_metadata_google.cloud.enterpriseknowledgegraph.v1.json +++ b/packages/google-cloud-enterpriseknowledgegraph/samples/generated_samples/snippet_metadata_google.cloud.enterpriseknowledgegraph.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-enterpriseknowledgegraph", - "version": "0.3.2" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py b/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py index cf000b1da571..9a5ce1b1c561 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py +++ b/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py @@ -1727,9 +1727,11 @@ async def test_list_entity_reconciliation_jobs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_entity_reconciliation_jobs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts/gapic_version.py b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts/gapic_version.py index 9bb24ba52e7d..30274cc6e9dd 100644 --- a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts/gapic_version.py +++ b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/gapic_version.py b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/gapic_version.py index 9bb24ba52e7d..30274cc6e9dd 100644 --- a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/gapic_version.py +++ b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/services/essential_contacts_service/async_client.py b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/services/essential_contacts_service/async_client.py index 846071e4d54d..4cf8ab3c718e 100644 --- a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/services/essential_contacts_service/async_client.py +++ b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/services/essential_contacts_service/async_client.py @@ -963,7 +963,7 @@ async def sample_send_test_message(): metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "EssentialContactsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-essential-contacts/noxfile.py b/packages/google-cloud-essential-contacts/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-essential-contacts/noxfile.py +++ b/packages/google-cloud-essential-contacts/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-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py b/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py index ace3adeab164..45c85f4cea36 100644 --- a/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py +++ b/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py @@ -1685,9 +1685,11 @@ async def test_list_contacts_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_contacts(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 @@ -2491,9 +2493,11 @@ async def test_compute_contacts_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.compute_contacts(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-eventarc-publishing/google/cloud/eventarc_publishing/gapic_version.py b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing/gapic_version.py index 944f5ff9a363..30274cc6e9dd 100644 --- a/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing/gapic_version.py +++ b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing/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-eventarc-publishing/google/cloud/eventarc_publishing_v1/gapic_version.py b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/gapic_version.py index 944f5ff9a363..30274cc6e9dd 100644 --- a/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/gapic_version.py +++ b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_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-eventarc-publishing/google/cloud/eventarc_publishing_v1/services/publisher/async_client.py b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/services/publisher/async_client.py index 6f5dafea3f4a..f871a7ee27f8 100644 --- a/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/services/publisher/async_client.py +++ b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/services/publisher/async_client.py @@ -392,7 +392,7 @@ async def sample_publish_events(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PublisherAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-eventarc-publishing/noxfile.py b/packages/google-cloud-eventarc-publishing/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-eventarc-publishing/noxfile.py +++ b/packages/google-cloud-eventarc-publishing/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-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_async.py b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_async.py new file mode 100644 index 000000000000..0066b4da0297 --- /dev/null +++ b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_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 PublishChannelConnectionEvents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc-publishing + + +# [START eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_publishing_v1 + + +async def sample_publish_channel_connection_events(): + # Create a client + client = eventarc_publishing_v1.PublisherAsyncClient() + + # Initialize request argument(s) + request = eventarc_publishing_v1.PublishChannelConnectionEventsRequest( + ) + + # Make the request + response = await client.publish_channel_connection_events(request=request) + + # Handle the response + print(response) + +# [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_async] diff --git a/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_sync.py b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_sync.py new file mode 100644 index 000000000000..1fe652f6b490 --- /dev/null +++ b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_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 PublishChannelConnectionEvents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc-publishing + + +# [START eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_publishing_v1 + + +def sample_publish_channel_connection_events(): + # Create a client + client = eventarc_publishing_v1.PublisherClient() + + # Initialize request argument(s) + request = eventarc_publishing_v1.PublishChannelConnectionEventsRequest( + ) + + # Make the request + response = client.publish_channel_connection_events(request=request) + + # Handle the response + print(response) + +# [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] diff --git a/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_events_async.py b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_events_async.py new file mode 100644 index 000000000000..8b189fe2839c --- /dev/null +++ b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_events_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 PublishEvents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc-publishing + + +# [START eventarcpublishing_v1_generated_Publisher_PublishEvents_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_publishing_v1 + + +async def sample_publish_events(): + # Create a client + client = eventarc_publishing_v1.PublisherAsyncClient() + + # Initialize request argument(s) + request = eventarc_publishing_v1.PublishEventsRequest( + ) + + # Make the request + response = await client.publish_events(request=request) + + # Handle the response + print(response) + +# [END eventarcpublishing_v1_generated_Publisher_PublishEvents_async] diff --git a/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_events_sync.py b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_events_sync.py new file mode 100644 index 000000000000..23a3ae88cc3b --- /dev/null +++ b/packages/google-cloud-eventarc-publishing/samples/generated_samples/eventarcpublishing_v1_generated_publisher_publish_events_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 PublishEvents +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc-publishing + + +# [START eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_publishing_v1 + + +def sample_publish_events(): + # Create a client + client = eventarc_publishing_v1.PublisherClient() + + # Initialize request argument(s) + request = eventarc_publishing_v1.PublishEventsRequest( + ) + + # Make the request + response = client.publish_events(request=request) + + # Handle the response + print(response) + +# [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] diff --git a/packages/google-cloud-eventarc-publishing/samples/generated_samples/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/packages/google-cloud-eventarc-publishing/samples/generated_samples/snippet_metadata_google.cloud.eventarc.publishing.v1.json new file mode 100644 index 000000000000..315310cec9dd --- /dev/null +++ b/packages/google-cloud-eventarc-publishing/samples/generated_samples/snippet_metadata_google.cloud.eventarc.publishing.v1.json @@ -0,0 +1,321 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.eventarc.publishing.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-eventarc-publishing", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_publishing_v1.PublisherAsyncClient", + "shortName": "PublisherAsyncClient" + }, + "fullName": "google.cloud.eventarc_publishing_v1.PublisherAsyncClient.publish_channel_connection_events", + "method": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", + "service": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher", + "shortName": "Publisher" + }, + "shortName": "PublishChannelConnectionEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_publishing_v1.types.PublishChannelConnectionEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.eventarc_publishing_v1.types.PublishChannelConnectionEventsResponse", + "shortName": "publish_channel_connection_events" + }, + "description": "Sample for PublishChannelConnectionEvents", + "file": "eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_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": "eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_publishing_v1.PublisherClient", + "shortName": "PublisherClient" + }, + "fullName": "google.cloud.eventarc_publishing_v1.PublisherClient.publish_channel_connection_events", + "method": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", + "service": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher", + "shortName": "Publisher" + }, + "shortName": "PublishChannelConnectionEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_publishing_v1.types.PublishChannelConnectionEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.eventarc_publishing_v1.types.PublishChannelConnectionEventsResponse", + "shortName": "publish_channel_connection_events" + }, + "description": "Sample for PublishChannelConnectionEvents", + "file": "eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_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": "eventarcpublishing_v1_generated_publisher_publish_channel_connection_events_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_publishing_v1.PublisherAsyncClient", + "shortName": "PublisherAsyncClient" + }, + "fullName": "google.cloud.eventarc_publishing_v1.PublisherAsyncClient.publish_events", + "method": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", + "service": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher", + "shortName": "Publisher" + }, + "shortName": "PublishEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_publishing_v1.types.PublishEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.eventarc_publishing_v1.types.PublishEventsResponse", + "shortName": "publish_events" + }, + "description": "Sample for PublishEvents", + "file": "eventarcpublishing_v1_generated_publisher_publish_events_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishEvents_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": "eventarcpublishing_v1_generated_publisher_publish_events_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_publishing_v1.PublisherClient", + "shortName": "PublisherClient" + }, + "fullName": "google.cloud.eventarc_publishing_v1.PublisherClient.publish_events", + "method": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", + "service": { + "fullName": "google.cloud.eventarc.publishing.v1.Publisher", + "shortName": "Publisher" + }, + "shortName": "PublishEvents" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_publishing_v1.types.PublishEventsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.eventarc_publishing_v1.types.PublishEventsResponse", + "shortName": "publish_events" + }, + "description": "Sample for PublishEvents", + "file": "eventarcpublishing_v1_generated_publisher_publish_events_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishEvents_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": "eventarcpublishing_v1_generated_publisher_publish_events_sync.py" + } + ] +} diff --git a/packages/google-cloud-eventarc/google/cloud/eventarc/gapic_version.py b/packages/google-cloud-eventarc/google/cloud/eventarc/gapic_version.py index 13f1b4a785d4..30274cc6e9dd 100644 --- a/packages/google-cloud-eventarc/google/cloud/eventarc/gapic_version.py +++ b/packages/google-cloud-eventarc/google/cloud/eventarc/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/gapic_version.py b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/gapic_version.py index 13f1b4a785d4..30274cc6e9dd 100644 --- a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/gapic_version.py +++ b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.9.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py index e027af64058b..37adcd563d7f 100644 --- a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py +++ b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py @@ -3065,7 +3065,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EventarcAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py index 572ff0f53f50..49ed3e7e4d9d 100644 --- a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py +++ b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py @@ -3090,7 +3090,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"] @@ -3172,7 +3172,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"] @@ -3241,7 +3241,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-eventarc/noxfile.py b/packages/google-cloud-eventarc/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-eventarc/noxfile.py +++ b/packages/google-cloud-eventarc/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-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_async.py new file mode 100644 index 000000000000..388b69c8f3d2 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_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 CreateChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_CreateChannel_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_create_channel(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + channel = eventarc_v1.Channel() + channel.pubsub_topic = "pubsub_topic_value" + channel.name = "name_value" + + request = eventarc_v1.CreateChannelRequest( + parent="parent_value", + channel=channel, + channel_id="channel_id_value", + validate_only=True, + ) + + # Make the request + operation = client.create_channel(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_CreateChannel_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_async.py new file mode 100644 index 000000000000..6a8863dbef50 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_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 CreateChannelConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_CreateChannelConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_create_channel_connection(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + channel_connection = eventarc_v1.ChannelConnection() + channel_connection.name = "name_value" + channel_connection.channel = "channel_value" + + request = eventarc_v1.CreateChannelConnectionRequest( + parent="parent_value", + channel_connection=channel_connection, + channel_connection_id="channel_connection_id_value", + ) + + # Make the request + operation = client.create_channel_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_CreateChannelConnection_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_sync.py new file mode 100644 index 000000000000..6acc65ff3a9e --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_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 CreateChannelConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_create_channel_connection(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + channel_connection = eventarc_v1.ChannelConnection() + channel_connection.name = "name_value" + channel_connection.channel = "channel_value" + + request = eventarc_v1.CreateChannelConnectionRequest( + parent="parent_value", + channel_connection=channel_connection, + channel_connection_id="channel_connection_id_value", + ) + + # Make the request + operation = client.create_channel_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_sync.py new file mode 100644 index 000000000000..5b919e5c5e67 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_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 CreateChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_CreateChannel_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_create_channel(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + channel = eventarc_v1.Channel() + channel.pubsub_topic = "pubsub_topic_value" + channel.name = "name_value" + + request = eventarc_v1.CreateChannelRequest( + parent="parent_value", + channel=channel, + channel_id="channel_id_value", + validate_only=True, + ) + + # Make the request + operation = client.create_channel(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_CreateChannel_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py new file mode 100644 index 000000000000..711417033982 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_CreateTrigger_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_create_trigger(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + trigger = eventarc_v1.Trigger() + trigger.name = "name_value" + trigger.event_filters.attribute = "attribute_value" + trigger.event_filters.value = "value_value" + trigger.destination.cloud_run.service = "service_value" + trigger.destination.cloud_run.region = "region_value" + + request = eventarc_v1.CreateTriggerRequest( + parent="parent_value", + trigger=trigger, + trigger_id="trigger_id_value", + validate_only=True, + ) + + # Make the request + operation = client.create_trigger(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_CreateTrigger_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_sync.py new file mode 100644 index 000000000000..998fdb703976 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_sync.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_CreateTrigger_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_create_trigger(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + trigger = eventarc_v1.Trigger() + trigger.name = "name_value" + trigger.event_filters.attribute = "attribute_value" + trigger.event_filters.value = "value_value" + trigger.destination.cloud_run.service = "service_value" + trigger.destination.cloud_run.region = "region_value" + + request = eventarc_v1.CreateTriggerRequest( + parent="parent_value", + trigger=trigger, + trigger_id="trigger_id_value", + validate_only=True, + ) + + # Make the request + operation = client.create_trigger(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_CreateTrigger_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_async.py new file mode 100644 index 000000000000..912b9a20b270 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_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 DeleteChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_DeleteChannel_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_delete_channel(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.DeleteChannelRequest( + name="name_value", + validate_only=True, + ) + + # Make the request + operation = client.delete_channel(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_DeleteChannel_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_async.py new file mode 100644 index 000000000000..e7144e46e146 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_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 DeleteChannelConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_DeleteChannelConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_delete_channel_connection(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.DeleteChannelConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_channel_connection(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_DeleteChannelConnection_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_sync.py new file mode 100644 index 000000000000..a917b255435c --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_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 DeleteChannelConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_delete_channel_connection(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.DeleteChannelConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_channel_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_sync.py new file mode 100644 index 000000000000..86db1679d11e --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_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 DeleteChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_DeleteChannel_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_delete_channel(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.DeleteChannelRequest( + name="name_value", + validate_only=True, + ) + + # Make the request + operation = client.delete_channel(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_DeleteChannel_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_async.py new file mode 100644 index 000000000000..d5063eff520f --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_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 DeleteTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_DeleteTrigger_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_delete_trigger(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.DeleteTriggerRequest( + name="name_value", + validate_only=True, + ) + + # Make the request + operation = client.delete_trigger(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_DeleteTrigger_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_sync.py new file mode 100644 index 000000000000..880f2bad4a9b --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_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 DeleteTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_DeleteTrigger_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_delete_trigger(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.DeleteTriggerRequest( + name="name_value", + validate_only=True, + ) + + # Make the request + operation = client.delete_trigger(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_DeleteTrigger_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_async.py new file mode 100644 index 000000000000..b275cc1155c0 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_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 GetChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetChannel_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_get_channel(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.GetChannelRequest( + name="name_value", + ) + + # Make the request + response = await client.get_channel(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetChannel_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_connection_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_connection_async.py new file mode 100644 index 000000000000..92765f93ec58 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_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 GetChannelConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetChannelConnection_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_get_channel_connection(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.GetChannelConnectionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_channel_connection(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetChannelConnection_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_connection_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_connection_sync.py new file mode 100644 index 000000000000..7f839ea0a544 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_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 GetChannelConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetChannelConnection_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_get_channel_connection(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.GetChannelConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_channel_connection(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetChannelConnection_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_sync.py new file mode 100644 index 000000000000..8191cf5b33ea --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_channel_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 GetChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetChannel_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_get_channel(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.GetChannelRequest( + name="name_value", + ) + + # Make the request + response = client.get_channel(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetChannel_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_google_channel_config_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_google_channel_config_async.py new file mode 100644 index 000000000000..562852ce8e2c --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_google_channel_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 GetGoogleChannelConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_get_google_channel_config(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.GetGoogleChannelConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_google_channel_config(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_google_channel_config_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_google_channel_config_sync.py new file mode 100644 index 000000000000..031614df60a1 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_google_channel_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 GetGoogleChannelConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_get_google_channel_config(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.GetGoogleChannelConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_google_channel_config(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_provider_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_provider_async.py new file mode 100644 index 000000000000..1a02aee96a07 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_provider_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 GetProvider +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetProvider_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_get_provider(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.GetProviderRequest( + name="name_value", + ) + + # Make the request + response = await client.get_provider(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetProvider_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_provider_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_provider_sync.py new file mode 100644 index 000000000000..67577f611aa1 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_provider_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 GetProvider +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetProvider_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_get_provider(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.GetProviderRequest( + name="name_value", + ) + + # Make the request + response = client.get_provider(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetProvider_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_trigger_async.py new file mode 100644 index 000000000000..228e7e550a79 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_trigger_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 GetTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetTrigger_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_get_trigger(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.GetTriggerRequest( + name="name_value", + ) + + # Make the request + response = await client.get_trigger(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetTrigger_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_trigger_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_trigger_sync.py new file mode 100644 index 000000000000..ef1277a73fc6 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_get_trigger_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 GetTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_GetTrigger_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_get_trigger(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.GetTriggerRequest( + name="name_value", + ) + + # Make the request + response = client.get_trigger(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_GetTrigger_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channel_connections_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channel_connections_async.py new file mode 100644 index 000000000000..7def32e02959 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channel_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 ListChannelConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListChannelConnections_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_list_channel_connections(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.ListChannelConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channel_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListChannelConnections_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channel_connections_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channel_connections_sync.py new file mode 100644 index 000000000000..6a3382c7ab9c --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channel_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 ListChannelConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListChannelConnections_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_list_channel_connections(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.ListChannelConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channel_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListChannelConnections_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channels_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channels_async.py new file mode 100644 index 000000000000..7cba6a676d38 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channels_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 ListChannels +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListChannels_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_list_channels(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.ListChannelsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channels(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListChannels_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channels_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channels_sync.py new file mode 100644 index 000000000000..f60d794cedd7 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_channels_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 ListChannels +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListChannels_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_list_channels(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.ListChannelsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_channels(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListChannels_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_providers_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_providers_async.py new file mode 100644 index 000000000000..130df07cf768 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_providers_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 ListProviders +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListProviders_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_list_providers(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.ListProvidersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_providers(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListProviders_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_providers_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_providers_sync.py new file mode 100644 index 000000000000..469c28433756 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_providers_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 ListProviders +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListProviders_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_list_providers(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.ListProvidersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_providers(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListProviders_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_triggers_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_triggers_async.py new file mode 100644 index 000000000000..a7a99b5a0f6a --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_triggers_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 ListTriggers +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListTriggers_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_list_triggers(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.ListTriggersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_triggers(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListTriggers_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_triggers_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_triggers_sync.py new file mode 100644 index 000000000000..ea6b79848847 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_list_triggers_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 ListTriggers +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_ListTriggers_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_list_triggers(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.ListTriggersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_triggers(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END eventarc_v1_generated_Eventarc_ListTriggers_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_async.py new file mode 100644 index 000000000000..4d261b163dcc --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_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 UpdateChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_UpdateChannel_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_update_channel(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.UpdateChannelRequest( + validate_only=True, + ) + + # Make the request + operation = client.update_channel(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_UpdateChannel_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_sync.py new file mode 100644 index 000000000000..8736536f1dac --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_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 UpdateChannel +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_UpdateChannel_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_update_channel(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.UpdateChannelRequest( + validate_only=True, + ) + + # Make the request + operation = client.update_channel(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_UpdateChannel_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_channel_config_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_channel_config_async.py new file mode 100644 index 000000000000..de6fdae8ba9c --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_channel_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 UpdateGoogleChannelConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_update_google_channel_config(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + google_channel_config = eventarc_v1.GoogleChannelConfig() + google_channel_config.name = "name_value" + + request = eventarc_v1.UpdateGoogleChannelConfigRequest( + google_channel_config=google_channel_config, + ) + + # Make the request + response = await client.update_google_channel_config(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_channel_config_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_channel_config_sync.py new file mode 100644 index 000000000000..ae7d4252a3bd --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_channel_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 UpdateGoogleChannelConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_update_google_channel_config(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + google_channel_config = eventarc_v1.GoogleChannelConfig() + google_channel_config.name = "name_value" + + request = eventarc_v1.UpdateGoogleChannelConfigRequest( + google_channel_config=google_channel_config, + ) + + # Make the request + response = client.update_google_channel_config(request=request) + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_async.py new file mode 100644 index 000000000000..a0e2a98f606f --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_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 UpdateTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_UpdateTrigger_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +async def sample_update_trigger(): + # Create a client + client = eventarc_v1.EventarcAsyncClient() + + # Initialize request argument(s) + request = eventarc_v1.UpdateTriggerRequest( + validate_only=True, + ) + + # Make the request + operation = client.update_trigger(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_UpdateTrigger_async] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_sync.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_sync.py new file mode 100644 index 000000000000..b17b34a63b52 --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_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 UpdateTrigger +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-eventarc + + +# [START eventarc_v1_generated_Eventarc_UpdateTrigger_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import eventarc_v1 + + +def sample_update_trigger(): + # Create a client + client = eventarc_v1.EventarcClient() + + # Initialize request argument(s) + request = eventarc_v1.UpdateTriggerRequest( + validate_only=True, + ) + + # Make the request + operation = client.update_trigger(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END eventarc_v1_generated_Eventarc_UpdateTrigger_sync] diff --git a/packages/google-cloud-eventarc/samples/generated_samples/snippet_metadata_google.cloud.eventarc.v1.json b/packages/google-cloud-eventarc/samples/generated_samples/snippet_metadata_google.cloud.eventarc.v1.json new file mode 100644 index 000000000000..596aaecb1b9c --- /dev/null +++ b/packages/google-cloud-eventarc/samples/generated_samples/snippet_metadata_google.cloud.eventarc.v1.json @@ -0,0 +1,3001 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.eventarc.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-eventarc", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.create_channel_connection", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateChannelConnection", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "CreateChannelConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.CreateChannelConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "channel_connection", + "type": "google.cloud.eventarc_v1.types.ChannelConnection" + }, + { + "name": "channel_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_channel_connection" + }, + "description": "Sample for CreateChannelConnection", + "file": "eventarc_v1_generated_eventarc_create_channel_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_CreateChannelConnection_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": "eventarc_v1_generated_eventarc_create_channel_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.create_channel_connection", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateChannelConnection", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "CreateChannelConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.CreateChannelConnectionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "channel_connection", + "type": "google.cloud.eventarc_v1.types.ChannelConnection" + }, + { + "name": "channel_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_channel_connection" + }, + "description": "Sample for CreateChannelConnection", + "file": "eventarc_v1_generated_eventarc_create_channel_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_CreateChannelConnection_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": "eventarc_v1_generated_eventarc_create_channel_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.create_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "CreateChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.CreateChannelRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "channel", + "type": "google.cloud.eventarc_v1.types.Channel" + }, + { + "name": "channel_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_channel" + }, + "description": "Sample for CreateChannel", + "file": "eventarc_v1_generated_eventarc_create_channel_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_CreateChannel_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": "eventarc_v1_generated_eventarc_create_channel_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.create_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "CreateChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.CreateChannelRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "channel", + "type": "google.cloud.eventarc_v1.types.Channel" + }, + { + "name": "channel_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_channel" + }, + "description": "Sample for CreateChannel", + "file": "eventarc_v1_generated_eventarc_create_channel_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_CreateChannel_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": "eventarc_v1_generated_eventarc_create_channel_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.create_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "CreateTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.CreateTriggerRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "trigger", + "type": "google.cloud.eventarc_v1.types.Trigger" + }, + { + "name": "trigger_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_trigger" + }, + "description": "Sample for CreateTrigger", + "file": "eventarc_v1_generated_eventarc_create_trigger_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_CreateTrigger_async", + "segments": [ + { + "end": 65, + "start": 27, + "type": "FULL" + }, + { + "end": 65, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 55, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 62, + "start": 56, + "type": "REQUEST_EXECUTION" + }, + { + "end": 66, + "start": 63, + "type": "RESPONSE_HANDLING" + } + ], + "title": "eventarc_v1_generated_eventarc_create_trigger_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.create_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.CreateTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "CreateTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.CreateTriggerRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "trigger", + "type": "google.cloud.eventarc_v1.types.Trigger" + }, + { + "name": "trigger_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_trigger" + }, + "description": "Sample for CreateTrigger", + "file": "eventarc_v1_generated_eventarc_create_trigger_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_CreateTrigger_sync", + "segments": [ + { + "end": 65, + "start": 27, + "type": "FULL" + }, + { + "end": 65, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 55, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 62, + "start": 56, + "type": "REQUEST_EXECUTION" + }, + { + "end": 66, + "start": 63, + "type": "RESPONSE_HANDLING" + } + ], + "title": "eventarc_v1_generated_eventarc_create_trigger_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.delete_channel_connection", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteChannelConnection", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "DeleteChannelConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.DeleteChannelConnectionRequest" + }, + { + "name": "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_channel_connection" + }, + "description": "Sample for DeleteChannelConnection", + "file": "eventarc_v1_generated_eventarc_delete_channel_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_DeleteChannelConnection_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": "eventarc_v1_generated_eventarc_delete_channel_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.delete_channel_connection", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteChannelConnection", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "DeleteChannelConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.DeleteChannelConnectionRequest" + }, + { + "name": "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_channel_connection" + }, + "description": "Sample for DeleteChannelConnection", + "file": "eventarc_v1_generated_eventarc_delete_channel_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_DeleteChannelConnection_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": "eventarc_v1_generated_eventarc_delete_channel_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.delete_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "DeleteChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.DeleteChannelRequest" + }, + { + "name": "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_channel" + }, + "description": "Sample for DeleteChannel", + "file": "eventarc_v1_generated_eventarc_delete_channel_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_DeleteChannel_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": "eventarc_v1_generated_eventarc_delete_channel_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.delete_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "DeleteChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.DeleteChannelRequest" + }, + { + "name": "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_channel" + }, + "description": "Sample for DeleteChannel", + "file": "eventarc_v1_generated_eventarc_delete_channel_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_DeleteChannel_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": "eventarc_v1_generated_eventarc_delete_channel_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.delete_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "DeleteTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.DeleteTriggerRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "allow_missing", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_trigger" + }, + "description": "Sample for DeleteTrigger", + "file": "eventarc_v1_generated_eventarc_delete_trigger_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_DeleteTrigger_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": "eventarc_v1_generated_eventarc_delete_trigger_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.delete_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.DeleteTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "DeleteTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.DeleteTriggerRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "allow_missing", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_trigger" + }, + "description": "Sample for DeleteTrigger", + "file": "eventarc_v1_generated_eventarc_delete_trigger_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_DeleteTrigger_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": "eventarc_v1_generated_eventarc_delete_trigger_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.get_channel_connection", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetChannelConnection", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetChannelConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetChannelConnectionRequest" + }, + { + "name": "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.eventarc_v1.types.ChannelConnection", + "shortName": "get_channel_connection" + }, + "description": "Sample for GetChannelConnection", + "file": "eventarc_v1_generated_eventarc_get_channel_connection_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetChannelConnection_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": "eventarc_v1_generated_eventarc_get_channel_connection_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.get_channel_connection", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetChannelConnection", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetChannelConnection" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetChannelConnectionRequest" + }, + { + "name": "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.eventarc_v1.types.ChannelConnection", + "shortName": "get_channel_connection" + }, + "description": "Sample for GetChannelConnection", + "file": "eventarc_v1_generated_eventarc_get_channel_connection_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetChannelConnection_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": "eventarc_v1_generated_eventarc_get_channel_connection_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.get_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetChannelRequest" + }, + { + "name": "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.eventarc_v1.types.Channel", + "shortName": "get_channel" + }, + "description": "Sample for GetChannel", + "file": "eventarc_v1_generated_eventarc_get_channel_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetChannel_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": "eventarc_v1_generated_eventarc_get_channel_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.get_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetChannelRequest" + }, + { + "name": "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.eventarc_v1.types.Channel", + "shortName": "get_channel" + }, + "description": "Sample for GetChannel", + "file": "eventarc_v1_generated_eventarc_get_channel_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetChannel_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": "eventarc_v1_generated_eventarc_get_channel_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.get_google_channel_config", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetGoogleChannelConfig", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetGoogleChannelConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetGoogleChannelConfigRequest" + }, + { + "name": "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.eventarc_v1.types.GoogleChannelConfig", + "shortName": "get_google_channel_config" + }, + "description": "Sample for GetGoogleChannelConfig", + "file": "eventarc_v1_generated_eventarc_get_google_channel_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_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": "eventarc_v1_generated_eventarc_get_google_channel_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.get_google_channel_config", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetGoogleChannelConfig", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetGoogleChannelConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetGoogleChannelConfigRequest" + }, + { + "name": "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.eventarc_v1.types.GoogleChannelConfig", + "shortName": "get_google_channel_config" + }, + "description": "Sample for GetGoogleChannelConfig", + "file": "eventarc_v1_generated_eventarc_get_google_channel_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_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": "eventarc_v1_generated_eventarc_get_google_channel_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.get_provider", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetProvider", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetProvider" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetProviderRequest" + }, + { + "name": "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.eventarc_v1.types.Provider", + "shortName": "get_provider" + }, + "description": "Sample for GetProvider", + "file": "eventarc_v1_generated_eventarc_get_provider_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetProvider_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": "eventarc_v1_generated_eventarc_get_provider_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.get_provider", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetProvider", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetProvider" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetProviderRequest" + }, + { + "name": "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.eventarc_v1.types.Provider", + "shortName": "get_provider" + }, + "description": "Sample for GetProvider", + "file": "eventarc_v1_generated_eventarc_get_provider_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetProvider_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": "eventarc_v1_generated_eventarc_get_provider_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.get_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetTriggerRequest" + }, + { + "name": "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.eventarc_v1.types.Trigger", + "shortName": "get_trigger" + }, + "description": "Sample for GetTrigger", + "file": "eventarc_v1_generated_eventarc_get_trigger_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetTrigger_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": "eventarc_v1_generated_eventarc_get_trigger_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.get_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.GetTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "GetTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.GetTriggerRequest" + }, + { + "name": "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.eventarc_v1.types.Trigger", + "shortName": "get_trigger" + }, + "description": "Sample for GetTrigger", + "file": "eventarc_v1_generated_eventarc_get_trigger_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_GetTrigger_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": "eventarc_v1_generated_eventarc_get_trigger_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.list_channel_connections", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListChannelConnections", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListChannelConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListChannelConnectionsRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListChannelConnectionsAsyncPager", + "shortName": "list_channel_connections" + }, + "description": "Sample for ListChannelConnections", + "file": "eventarc_v1_generated_eventarc_list_channel_connections_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListChannelConnections_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": "eventarc_v1_generated_eventarc_list_channel_connections_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.list_channel_connections", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListChannelConnections", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListChannelConnections" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListChannelConnectionsRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListChannelConnectionsPager", + "shortName": "list_channel_connections" + }, + "description": "Sample for ListChannelConnections", + "file": "eventarc_v1_generated_eventarc_list_channel_connections_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListChannelConnections_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": "eventarc_v1_generated_eventarc_list_channel_connections_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.list_channels", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListChannels", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListChannels" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListChannelsRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListChannelsAsyncPager", + "shortName": "list_channels" + }, + "description": "Sample for ListChannels", + "file": "eventarc_v1_generated_eventarc_list_channels_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListChannels_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": "eventarc_v1_generated_eventarc_list_channels_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.list_channels", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListChannels", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListChannels" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListChannelsRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListChannelsPager", + "shortName": "list_channels" + }, + "description": "Sample for ListChannels", + "file": "eventarc_v1_generated_eventarc_list_channels_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListChannels_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": "eventarc_v1_generated_eventarc_list_channels_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.list_providers", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListProviders", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListProviders" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListProvidersRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListProvidersAsyncPager", + "shortName": "list_providers" + }, + "description": "Sample for ListProviders", + "file": "eventarc_v1_generated_eventarc_list_providers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListProviders_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": "eventarc_v1_generated_eventarc_list_providers_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.list_providers", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListProviders", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListProviders" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListProvidersRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListProvidersPager", + "shortName": "list_providers" + }, + "description": "Sample for ListProviders", + "file": "eventarc_v1_generated_eventarc_list_providers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListProviders_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": "eventarc_v1_generated_eventarc_list_providers_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.list_triggers", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListTriggers", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListTriggers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListTriggersRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListTriggersAsyncPager", + "shortName": "list_triggers" + }, + "description": "Sample for ListTriggers", + "file": "eventarc_v1_generated_eventarc_list_triggers_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListTriggers_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": "eventarc_v1_generated_eventarc_list_triggers_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.list_triggers", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.ListTriggers", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "ListTriggers" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.ListTriggersRequest" + }, + { + "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.eventarc_v1.services.eventarc.pagers.ListTriggersPager", + "shortName": "list_triggers" + }, + "description": "Sample for ListTriggers", + "file": "eventarc_v1_generated_eventarc_list_triggers_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_ListTriggers_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": "eventarc_v1_generated_eventarc_list_triggers_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.update_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "UpdateChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.UpdateChannelRequest" + }, + { + "name": "channel", + "type": "google.cloud.eventarc_v1.types.Channel" + }, + { + "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_channel" + }, + "description": "Sample for UpdateChannel", + "file": "eventarc_v1_generated_eventarc_update_channel_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_UpdateChannel_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": "eventarc_v1_generated_eventarc_update_channel_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.update_channel", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateChannel", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "UpdateChannel" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.UpdateChannelRequest" + }, + { + "name": "channel", + "type": "google.cloud.eventarc_v1.types.Channel" + }, + { + "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_channel" + }, + "description": "Sample for UpdateChannel", + "file": "eventarc_v1_generated_eventarc_update_channel_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_UpdateChannel_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": "eventarc_v1_generated_eventarc_update_channel_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.update_google_channel_config", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleChannelConfig", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "UpdateGoogleChannelConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.UpdateGoogleChannelConfigRequest" + }, + { + "name": "google_channel_config", + "type": "google.cloud.eventarc_v1.types.GoogleChannelConfig" + }, + { + "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.eventarc_v1.types.GoogleChannelConfig", + "shortName": "update_google_channel_config" + }, + "description": "Sample for UpdateGoogleChannelConfig", + "file": "eventarc_v1_generated_eventarc_update_google_channel_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "eventarc_v1_generated_eventarc_update_google_channel_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.update_google_channel_config", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleChannelConfig", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "UpdateGoogleChannelConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.UpdateGoogleChannelConfigRequest" + }, + { + "name": "google_channel_config", + "type": "google.cloud.eventarc_v1.types.GoogleChannelConfig" + }, + { + "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.eventarc_v1.types.GoogleChannelConfig", + "shortName": "update_google_channel_config" + }, + "description": "Sample for UpdateGoogleChannelConfig", + "file": "eventarc_v1_generated_eventarc_update_google_channel_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "eventarc_v1_generated_eventarc_update_google_channel_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient", + "shortName": "EventarcAsyncClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcAsyncClient.update_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "UpdateTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.UpdateTriggerRequest" + }, + { + "name": "trigger", + "type": "google.cloud.eventarc_v1.types.Trigger" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "allow_missing", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_trigger" + }, + "description": "Sample for UpdateTrigger", + "file": "eventarc_v1_generated_eventarc_update_trigger_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_UpdateTrigger_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": "eventarc_v1_generated_eventarc_update_trigger_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.eventarc_v1.EventarcClient", + "shortName": "EventarcClient" + }, + "fullName": "google.cloud.eventarc_v1.EventarcClient.update_trigger", + "method": { + "fullName": "google.cloud.eventarc.v1.Eventarc.UpdateTrigger", + "service": { + "fullName": "google.cloud.eventarc.v1.Eventarc", + "shortName": "Eventarc" + }, + "shortName": "UpdateTrigger" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.eventarc_v1.types.UpdateTriggerRequest" + }, + { + "name": "trigger", + "type": "google.cloud.eventarc_v1.types.Trigger" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "allow_missing", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_trigger" + }, + "description": "Sample for UpdateTrigger", + "file": "eventarc_v1_generated_eventarc_update_trigger_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "eventarc_v1_generated_Eventarc_UpdateTrigger_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": "eventarc_v1_generated_eventarc_update_trigger_sync.py" + } + ] +} diff --git a/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py b/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py index 07f582ede22c..19c7b4fb50f8 100644 --- a/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py +++ b/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py @@ -1354,9 +1354,11 @@ async def test_list_triggers_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_triggers(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 @@ -2755,9 +2757,11 @@ async def test_list_channels_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_channels(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 @@ -4119,9 +4123,11 @@ async def test_list_providers_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_providers(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 @@ -4825,9 +4831,11 @@ async def test_list_channel_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_channel_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-functions/google/cloud/functions/gapic_version.py b/packages/google-cloud-functions/google/cloud/functions/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-functions/google/cloud/functions/gapic_version.py +++ b/packages/google-cloud-functions/google/cloud/functions/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py b/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py +++ b/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py b/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py index 26fd0488f8b6..a27bdc7a2626 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py +++ b/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py @@ -1681,7 +1681,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CloudFunctionsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py b/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py +++ b/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py b/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py index 492b4c6d2ede..9c825efa3006 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py +++ b/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py @@ -1614,7 +1614,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "FunctionServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/transports/rest.py b/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/transports/rest.py index 2500123df914..583d18ae7452 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/transports/rest.py +++ b/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/transports/rest.py @@ -1580,7 +1580,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"] @@ -1652,7 +1652,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-functions/noxfile.py b/packages/google-cloud-functions/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-functions/noxfile.py +++ b/packages/google-cloud-functions/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-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py b/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py index ce221032ff75..f40b87747c63 100644 --- a/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py +++ b/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py @@ -1101,9 +1101,11 @@ async def test_list_functions_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_functions(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 @@ -1152,7 +1154,6 @@ def test_get_function(request_type, transport: str = "grpc"): docker_repository="docker_repository_value", docker_registry=functions.CloudFunction.DockerRegistry.CONTAINER_REGISTRY, source_archive_url="source_archive_url_value", - https_trigger=functions.HttpsTrigger(url="url_value"), ) response = client.get_function(request) @@ -3440,7 +3441,6 @@ def test_get_function_rest(request_type): docker_repository="docker_repository_value", docker_registry=functions.CloudFunction.DockerRegistry.CONTAINER_REGISTRY, source_archive_url="source_archive_url_value", - https_trigger=functions.HttpsTrigger(url="url_value"), ) # Wrap the value into a proper Response obj diff --git a/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py b/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py index af0bbf4cc59b..5cb85728d658 100644 --- a/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py +++ b/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py @@ -1407,9 +1407,11 @@ async def test_list_functions_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_functions(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-gke-connect-gateway/google/cloud/gkeconnect/gateway/gapic_version.py b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway/gapic_version.py index 6523b94bc63f..30274cc6e9dd 100644 --- a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway/gapic_version.py +++ b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.8.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/gapic_version.py b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/gapic_version.py index 6523b94bc63f..30274cc6e9dd 100644 --- a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/gapic_version.py +++ b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.8.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/async_client.py b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/async_client.py index 04af824546f6..e59cff07eb8f 100644 --- a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/async_client.py +++ b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/services/gateway_service/async_client.py @@ -1063,7 +1063,7 @@ async def sample_patch_resource(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "GatewayServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-gke-connect-gateway/noxfile.py b/packages/google-cloud-gke-connect-gateway/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-gke-connect-gateway/noxfile.py +++ b/packages/google-cloud-gke-connect-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-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_delete_resource_async.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_delete_resource_async.py new file mode 100644 index 000000000000..7104200b6860 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_delete_resource_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 DeleteResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +async def sample_delete_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceAsyncClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = await client.delete_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_DeleteResource_async] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_delete_resource_sync.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_delete_resource_sync.py new file mode 100644 index 000000000000..2600e5eb13e1 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_delete_resource_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 DeleteResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_DeleteResource_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +def sample_delete_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = client.delete_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_DeleteResource_sync] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_get_resource_async.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_get_resource_async.py new file mode 100644 index 000000000000..13a23c3efa3b --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_get_resource_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 GetResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_GetResource_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +async def sample_get_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceAsyncClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = await client.get_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_GetResource_async] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_get_resource_sync.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_get_resource_sync.py new file mode 100644 index 000000000000..8361eff41489 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_get_resource_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 GetResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_GetResource_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +def sample_get_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = client.get_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_GetResource_sync] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_async.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_async.py new file mode 100644 index 000000000000..b3a969595775 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_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 PatchResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_PatchResource_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +async def sample_patch_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceAsyncClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = await client.patch_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_PatchResource_async] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_sync.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_sync.py new file mode 100644 index 000000000000..dd940ba19b79 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_patch_resource_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 PatchResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_PatchResource_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +def sample_patch_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = client.patch_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_PatchResource_sync] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_post_resource_async.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_post_resource_async.py new file mode 100644 index 000000000000..2fe0dcdb2781 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_post_resource_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 PostResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_PostResource_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +async def sample_post_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceAsyncClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = await client.post_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_PostResource_async] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_post_resource_sync.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_post_resource_sync.py new file mode 100644 index 000000000000..12ad5c942a29 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_post_resource_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 PostResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_PostResource_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +def sample_post_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = client.post_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_PostResource_sync] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_put_resource_async.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_put_resource_async.py new file mode 100644 index 000000000000..0ff20f306635 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_put_resource_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 PutResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_PutResource_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +async def sample_put_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceAsyncClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = await client.put_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_PutResource_async] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_put_resource_sync.py b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_put_resource_sync.py new file mode 100644 index 000000000000..fa60d3067e2d --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/connectgateway_v1beta1_generated_gateway_service_put_resource_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 PutResource +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-connect-gateway + + +# [START connectgateway_v1beta1_generated_GatewayService_PutResource_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.api import httpbody_pb2 # type: ignore +from google.cloud.gkeconnect import gateway_v1beta1 + + +def sample_put_resource(): + # Create a client + client = gateway_v1beta1.GatewayServiceClient() + + # Initialize request argument(s) + request = httpbody_pb2.HttpBody( + ) + + # Make the request + response = client.put_resource(request=request) + + # Handle the response + print(response) + +# [END connectgateway_v1beta1_generated_GatewayService_PutResource_sync] diff --git a/packages/google-cloud-gke-connect-gateway/samples/generated_samples/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json new file mode 100644 index 000000000000..6586a7512b44 --- /dev/null +++ b/packages/google-cloud-gke-connect-gateway/samples/generated_samples/snippet_metadata_google.cloud.gkeconnect.gateway.v1beta1.json @@ -0,0 +1,780 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.gkeconnect.gateway.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-gke-connect-gateway", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient", + "shortName": "GatewayServiceAsyncClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient.delete_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "DeleteResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "delete_resource" + }, + "description": "Sample for DeleteResource", + "file": "connectgateway_v1beta1_generated_gateway_service_delete_resource_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_DeleteResource_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_delete_resource_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient", + "shortName": "GatewayServiceClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient.delete_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.DeleteResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "DeleteResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "delete_resource" + }, + "description": "Sample for DeleteResource", + "file": "connectgateway_v1beta1_generated_gateway_service_delete_resource_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_DeleteResource_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_delete_resource_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient", + "shortName": "GatewayServiceAsyncClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient.get_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "GetResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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_resource" + }, + "description": "Sample for GetResource", + "file": "connectgateway_v1beta1_generated_gateway_service_get_resource_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_GetResource_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_get_resource_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient", + "shortName": "GatewayServiceClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient.get_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.GetResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "GetResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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_resource" + }, + "description": "Sample for GetResource", + "file": "connectgateway_v1beta1_generated_gateway_service_get_resource_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_GetResource_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_get_resource_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient", + "shortName": "GatewayServiceAsyncClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient.patch_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "PatchResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "patch_resource" + }, + "description": "Sample for PatchResource", + "file": "connectgateway_v1beta1_generated_gateway_service_patch_resource_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PatchResource_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_patch_resource_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient", + "shortName": "GatewayServiceClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient.patch_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PatchResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "PatchResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "patch_resource" + }, + "description": "Sample for PatchResource", + "file": "connectgateway_v1beta1_generated_gateway_service_patch_resource_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PatchResource_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_patch_resource_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient", + "shortName": "GatewayServiceAsyncClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient.post_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "PostResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "post_resource" + }, + "description": "Sample for PostResource", + "file": "connectgateway_v1beta1_generated_gateway_service_post_resource_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PostResource_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_post_resource_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient", + "shortName": "GatewayServiceClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient.post_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PostResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "PostResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "post_resource" + }, + "description": "Sample for PostResource", + "file": "connectgateway_v1beta1_generated_gateway_service_post_resource_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PostResource_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_post_resource_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient", + "shortName": "GatewayServiceAsyncClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceAsyncClient.put_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "PutResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "put_resource" + }, + "description": "Sample for PutResource", + "file": "connectgateway_v1beta1_generated_gateway_service_put_resource_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PutResource_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_put_resource_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient", + "shortName": "GatewayServiceClient" + }, + "fullName": "google.cloud.gkeconnect.gateway_v1beta1.GatewayServiceClient.put_resource", + "method": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService.PutResource", + "service": { + "fullName": "google.cloud.gkeconnect.gateway.v1beta1.GatewayService", + "shortName": "GatewayService" + }, + "shortName": "PutResource" + }, + "parameters": [ + { + "name": "request", + "type": "google.api.httpbody_pb2.HttpBody" + }, + { + "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": "put_resource" + }, + "description": "Sample for PutResource", + "file": "connectgateway_v1beta1_generated_gateway_service_put_resource_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "connectgateway_v1beta1_generated_GatewayService_PutResource_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "connectgateway_v1beta1_generated_gateway_service_put_resource_sync.py" + } + ] +} diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud/gapic_version.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud/gapic_version.py index cd0aad0f134a..30274cc6e9dd 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud/gapic_version.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.6.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/gapic_version.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/gapic_version.py index cd0aad0f134a..30274cc6e9dd 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/gapic_version.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_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.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py index 5beccd73d000..32808d6324a2 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py @@ -1600,7 +1600,7 @@ async def cancel_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "AttachedClustersAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/transports/rest.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/transports/rest.py index 9ae6c9653edb..a5d048caf833 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/transports/rest.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/transports/rest.py @@ -1468,7 +1468,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-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py index 11b2aa8c4a72..fe395e32876b 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py @@ -2134,7 +2134,7 @@ async def cancel_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "AwsClustersAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/transports/rest.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/transports/rest.py index b202ade53d51..888d455bd8a7 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/transports/rest.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/transports/rest.py @@ -1943,7 +1943,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-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py index 0d9bcecee5f5..4ece7c47d9b3 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py @@ -2721,7 +2721,7 @@ async def cancel_operation( metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "AzureClustersAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/transports/rest.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/transports/rest.py index c9078d73fdd3..b8469ecc7107 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/transports/rest.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/transports/rest.py @@ -2491,7 +2491,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-gke-multicloud/noxfile.py b/packages/google-cloud-gke-multicloud/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-gke-multicloud/noxfile.py +++ b/packages/google-cloud-gke-multicloud/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-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py new file mode 100644 index 000000000000..f3a994b1f6b5 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_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 CreateAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_create_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + attached_cluster = gke_multicloud_v1.AttachedCluster() + attached_cluster.platform_version = "platform_version_value" + attached_cluster.distribution = "distribution_value" + attached_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.CreateAttachedClusterRequest( + parent="parent_value", + attached_cluster=attached_cluster, + attached_cluster_id="attached_cluster_id_value", + ) + + # Make the request + operation = client.create_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_sync.py new file mode 100644 index 000000000000..7975a2367da9 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_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 CreateAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_create_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + attached_cluster = gke_multicloud_v1.AttachedCluster() + attached_cluster.platform_version = "platform_version_value" + attached_cluster.distribution = "distribution_value" + attached_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.CreateAttachedClusterRequest( + parent="parent_value", + attached_cluster=attached_cluster, + attached_cluster_id="attached_cluster_id_value", + ) + + # Make the request + operation = client.create_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py new file mode 100644 index 000000000000..cc753580c925 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_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 DeleteAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_delete_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAttachedClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_sync.py new file mode 100644 index 000000000000..44bd8ae6cbae --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_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 DeleteAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_delete_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAttachedClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_async.py new file mode 100644 index 000000000000..575592151856 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_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 GenerateAttachedClusterInstallManifest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_generate_attached_cluster_install_manifest(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GenerateAttachedClusterInstallManifestRequest( + parent="parent_value", + attached_cluster_id="attached_cluster_id_value", + platform_version="platform_version_value", + ) + + # Make the request + response = await client.generate_attached_cluster_install_manifest(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_sync.py new file mode 100644 index 000000000000..8997efd048d4 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_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 GenerateAttachedClusterInstallManifest +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_generate_attached_cluster_install_manifest(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GenerateAttachedClusterInstallManifestRequest( + parent="parent_value", + attached_cluster_id="attached_cluster_id_value", + platform_version="platform_version_value", + ) + + # Make the request + response = client.generate_attached_cluster_install_manifest(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_async.py new file mode 100644 index 000000000000..5fc6eb12deae --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_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 GetAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAttachedClusterRequest( + name="name_value", + ) + + # Make the request + response = await client.get_attached_cluster(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_sync.py new file mode 100644 index 000000000000..0d69b4657363 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_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 GetAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAttachedClusterRequest( + name="name_value", + ) + + # Make the request + response = client.get_attached_cluster(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_async.py new file mode 100644 index 000000000000..19db44545eaa --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_server_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 GetAttachedServerConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_attached_server_config(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAttachedServerConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_attached_server_config(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_sync.py new file mode 100644 index 000000000000..6e0a6e13a49c --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_get_attached_server_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 GetAttachedServerConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_attached_server_config(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAttachedServerConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_attached_server_config(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py new file mode 100644 index 000000000000..a869436f2e63 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_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 ImportAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_import_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ImportAttachedClusterRequest( + parent="parent_value", + fleet_membership="fleet_membership_value", + platform_version="platform_version_value", + distribution="distribution_value", + ) + + # Make the request + operation = client.import_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_sync.py new file mode 100644 index 000000000000..6420c7cac1ee --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_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 ImportAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_import_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ImportAttachedClusterRequest( + parent="parent_value", + fleet_membership="fleet_membership_value", + platform_version="platform_version_value", + distribution="distribution_value", + ) + + # Make the request + operation = client.import_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_async.py new file mode 100644 index 000000000000..1661afa13d8d --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_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 ListAttachedClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_list_attached_clusters(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAttachedClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_attached_clusters(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_sync.py new file mode 100644 index 000000000000..8edf970eed5e --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_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 ListAttachedClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_list_attached_clusters(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAttachedClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_attached_clusters(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py new file mode 100644 index 000000000000..b07ea458d379 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_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 UpdateAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_update_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersAsyncClient() + + # Initialize request argument(s) + attached_cluster = gke_multicloud_v1.AttachedCluster() + attached_cluster.platform_version = "platform_version_value" + attached_cluster.distribution = "distribution_value" + attached_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.UpdateAttachedClusterRequest( + attached_cluster=attached_cluster, + ) + + # Make the request + operation = client.update_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_sync.py new file mode 100644 index 000000000000..0c97fbc632da --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_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 UpdateAttachedCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_update_attached_cluster(): + # Create a client + client = gke_multicloud_v1.AttachedClustersClient() + + # Initialize request argument(s) + attached_cluster = gke_multicloud_v1.AttachedCluster() + attached_cluster.platform_version = "platform_version_value" + attached_cluster.distribution = "distribution_value" + attached_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.UpdateAttachedClusterRequest( + attached_cluster=attached_cluster, + ) + + # Make the request + operation = client.update_attached_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py new file mode 100644 index 000000000000..e5dbf627ca18 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_create_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + aws_cluster = gke_multicloud_v1.AwsCluster() + aws_cluster.networking.vpc_id = "vpc_id_value" + aws_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + aws_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + aws_cluster.aws_region = "aws_region_value" + aws_cluster.control_plane.version = "version_value" + aws_cluster.control_plane.subnet_ids = ['subnet_ids_value1', 'subnet_ids_value2'] + aws_cluster.control_plane.iam_instance_profile = "iam_instance_profile_value" + aws_cluster.control_plane.database_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.control_plane.aws_services_authentication.role_arn = "role_arn_value" + aws_cluster.control_plane.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.authorization.admin_users.username = "username_value" + aws_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.CreateAwsClusterRequest( + parent="parent_value", + aws_cluster=aws_cluster, + aws_cluster_id="aws_cluster_id_value", + ) + + # Make the request + operation = client.create_aws_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_sync.py new file mode 100644 index 000000000000..0ba0ee55ba8e --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_sync.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_create_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + aws_cluster = gke_multicloud_v1.AwsCluster() + aws_cluster.networking.vpc_id = "vpc_id_value" + aws_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + aws_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + aws_cluster.aws_region = "aws_region_value" + aws_cluster.control_plane.version = "version_value" + aws_cluster.control_plane.subnet_ids = ['subnet_ids_value1', 'subnet_ids_value2'] + aws_cluster.control_plane.iam_instance_profile = "iam_instance_profile_value" + aws_cluster.control_plane.database_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.control_plane.aws_services_authentication.role_arn = "role_arn_value" + aws_cluster.control_plane.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.authorization.admin_users.username = "username_value" + aws_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.CreateAwsClusterRequest( + parent="parent_value", + aws_cluster=aws_cluster, + aws_cluster_id="aws_cluster_id_value", + ) + + # Make the request + operation = client.create_aws_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py new file mode 100644 index 000000000000..a159436ddeb5 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_create_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + aws_node_pool = gke_multicloud_v1.AwsNodePool() + aws_node_pool.version = "version_value" + aws_node_pool.config.iam_instance_profile = "iam_instance_profile_value" + aws_node_pool.config.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_node_pool.autoscaling.min_node_count = 1489 + aws_node_pool.autoscaling.max_node_count = 1491 + aws_node_pool.subnet_id = "subnet_id_value" + aws_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.CreateAwsNodePoolRequest( + parent="parent_value", + aws_node_pool=aws_node_pool, + aws_node_pool_id="aws_node_pool_id_value", + ) + + # Make the request + operation = client.create_aws_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_sync.py new file mode 100644 index 000000000000..5f74334636d2 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_sync.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_create_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + aws_node_pool = gke_multicloud_v1.AwsNodePool() + aws_node_pool.version = "version_value" + aws_node_pool.config.iam_instance_profile = "iam_instance_profile_value" + aws_node_pool.config.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_node_pool.autoscaling.min_node_count = 1489 + aws_node_pool.autoscaling.max_node_count = 1491 + aws_node_pool.subnet_id = "subnet_id_value" + aws_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.CreateAwsNodePoolRequest( + parent="parent_value", + aws_node_pool=aws_node_pool, + aws_node_pool_id="aws_node_pool_id_value", + ) + + # Make the request + operation = client.create_aws_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py new file mode 100644 index 000000000000..2424e8577d82 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_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 DeleteAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_delete_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAwsClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_aws_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_sync.py new file mode 100644 index 000000000000..1d01709147ec --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_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 DeleteAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_delete_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAwsClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_aws_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py new file mode 100644 index 000000000000..01ab0d72499c --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_delete_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAwsNodePoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_aws_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_sync.py new file mode 100644 index 000000000000..b7fef3e71006 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_delete_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAwsNodePoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_aws_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_async.py new file mode 100644 index 000000000000..9a30e6891a78 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_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 GenerateAwsAccessToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_generate_aws_access_token(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GenerateAwsAccessTokenRequest( + aws_cluster="aws_cluster_value", + ) + + # Make the request + response = await client.generate_aws_access_token(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_sync.py new file mode 100644 index 000000000000..9b23924973a8 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_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 GenerateAwsAccessToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_generate_aws_access_token(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GenerateAwsAccessTokenRequest( + aws_cluster="aws_cluster_value", + ) + + # Make the request + response = client.generate_aws_access_token(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_async.py new file mode 100644 index 000000000000..91801ddd0c33 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_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 GetAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAwsClusterRequest( + name="name_value", + ) + + # Make the request + response = await client.get_aws_cluster(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_sync.py new file mode 100644 index 000000000000..2742ad1529eb --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_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 GetAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAwsClusterRequest( + name="name_value", + ) + + # Make the request + response = client.get_aws_cluster(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_async.py new file mode 100644 index 000000000000..f73efb937a30 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAwsNodePoolRequest( + name="name_value", + ) + + # Make the request + response = await client.get_aws_node_pool(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_sync.py new file mode 100644 index 000000000000..95256984a28b --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAwsNodePoolRequest( + name="name_value", + ) + + # Make the request + response = client.get_aws_node_pool(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_async.py new file mode 100644 index 000000000000..6c93fb80842d --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_server_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 GetAwsServerConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_aws_server_config(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAwsServerConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_aws_server_config(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_sync.py new file mode 100644 index 000000000000..0e982836411f --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_get_aws_server_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 GetAwsServerConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_aws_server_config(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAwsServerConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_aws_server_config(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_async.py new file mode 100644 index 000000000000..ccb7b549eaca --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_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 ListAwsClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_list_aws_clusters(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAwsClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_aws_clusters(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_sync.py new file mode 100644 index 000000000000..77ccd7120243 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_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 ListAwsClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_list_aws_clusters(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAwsClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_aws_clusters(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_async.py new file mode 100644 index 000000000000..c1cae695f049 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAwsNodePools +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_list_aws_node_pools(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAwsNodePoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_aws_node_pools(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_sync.py new file mode 100644 index 000000000000..7b10ee8b6975 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAwsNodePools +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_list_aws_node_pools(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAwsNodePoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_aws_node_pools(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py new file mode 100644 index 000000000000..02fc89072af1 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_update_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + aws_cluster = gke_multicloud_v1.AwsCluster() + aws_cluster.networking.vpc_id = "vpc_id_value" + aws_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + aws_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + aws_cluster.aws_region = "aws_region_value" + aws_cluster.control_plane.version = "version_value" + aws_cluster.control_plane.subnet_ids = ['subnet_ids_value1', 'subnet_ids_value2'] + aws_cluster.control_plane.iam_instance_profile = "iam_instance_profile_value" + aws_cluster.control_plane.database_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.control_plane.aws_services_authentication.role_arn = "role_arn_value" + aws_cluster.control_plane.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.authorization.admin_users.username = "username_value" + aws_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.UpdateAwsClusterRequest( + aws_cluster=aws_cluster, + ) + + # Make the request + operation = client.update_aws_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_sync.py new file mode 100644 index 000000000000..6e1730a22a17 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_sync.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAwsCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_update_aws_cluster(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + aws_cluster = gke_multicloud_v1.AwsCluster() + aws_cluster.networking.vpc_id = "vpc_id_value" + aws_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + aws_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + aws_cluster.aws_region = "aws_region_value" + aws_cluster.control_plane.version = "version_value" + aws_cluster.control_plane.subnet_ids = ['subnet_ids_value1', 'subnet_ids_value2'] + aws_cluster.control_plane.iam_instance_profile = "iam_instance_profile_value" + aws_cluster.control_plane.database_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.control_plane.aws_services_authentication.role_arn = "role_arn_value" + aws_cluster.control_plane.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_cluster.authorization.admin_users.username = "username_value" + aws_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.UpdateAwsClusterRequest( + aws_cluster=aws_cluster, + ) + + # Make the request + operation = client.update_aws_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py new file mode 100644 index 000000000000..d05293fa019c --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_update_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersAsyncClient() + + # Initialize request argument(s) + aws_node_pool = gke_multicloud_v1.AwsNodePool() + aws_node_pool.version = "version_value" + aws_node_pool.config.iam_instance_profile = "iam_instance_profile_value" + aws_node_pool.config.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_node_pool.autoscaling.min_node_count = 1489 + aws_node_pool.autoscaling.max_node_count = 1491 + aws_node_pool.subnet_id = "subnet_id_value" + aws_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.UpdateAwsNodePoolRequest( + aws_node_pool=aws_node_pool, + ) + + # Make the request + operation = client.update_aws_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_sync.py new file mode 100644 index 000000000000..5ce94b4d7a57 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_sync.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAwsNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_update_aws_node_pool(): + # Create a client + client = gke_multicloud_v1.AwsClustersClient() + + # Initialize request argument(s) + aws_node_pool = gke_multicloud_v1.AwsNodePool() + aws_node_pool.version = "version_value" + aws_node_pool.config.iam_instance_profile = "iam_instance_profile_value" + aws_node_pool.config.config_encryption.kms_key_arn = "kms_key_arn_value" + aws_node_pool.autoscaling.min_node_count = 1489 + aws_node_pool.autoscaling.max_node_count = 1491 + aws_node_pool.subnet_id = "subnet_id_value" + aws_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.UpdateAwsNodePoolRequest( + aws_node_pool=aws_node_pool, + ) + + # Make the request + operation = client.update_aws_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py new file mode 100644 index 000000000000..1ec84b844888 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_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 CreateAzureClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_create_azure_client(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + azure_client = gke_multicloud_v1.AzureClient() + azure_client.tenant_id = "tenant_id_value" + azure_client.application_id = "application_id_value" + + request = gke_multicloud_v1.CreateAzureClientRequest( + parent="parent_value", + azure_client=azure_client, + azure_client_id="azure_client_id_value", + ) + + # Make the request + operation = client.create_azure_client(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_sync.py new file mode 100644 index 000000000000..b6987a21ff14 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_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 CreateAzureClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_create_azure_client(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + azure_client = gke_multicloud_v1.AzureClient() + azure_client.tenant_id = "tenant_id_value" + azure_client.application_id = "application_id_value" + + request = gke_multicloud_v1.CreateAzureClientRequest( + parent="parent_value", + azure_client=azure_client, + azure_client_id="azure_client_id_value", + ) + + # Make the request + operation = client.create_azure_client(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py new file mode 100644 index 000000000000..32604a986942 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_create_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + azure_cluster = gke_multicloud_v1.AzureCluster() + azure_cluster.azure_region = "azure_region_value" + azure_cluster.resource_group_id = "resource_group_id_value" + azure_cluster.networking.virtual_network_id = "virtual_network_id_value" + azure_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + azure_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + azure_cluster.control_plane.version = "version_value" + azure_cluster.control_plane.ssh_config.authorized_key = "authorized_key_value" + azure_cluster.authorization.admin_users.username = "username_value" + azure_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.CreateAzureClusterRequest( + parent="parent_value", + azure_cluster=azure_cluster, + azure_cluster_id="azure_cluster_id_value", + ) + + # Make the request + operation = client.create_azure_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_sync.py new file mode 100644 index 000000000000..08bf4a491ae2 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_sync.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_create_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + azure_cluster = gke_multicloud_v1.AzureCluster() + azure_cluster.azure_region = "azure_region_value" + azure_cluster.resource_group_id = "resource_group_id_value" + azure_cluster.networking.virtual_network_id = "virtual_network_id_value" + azure_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + azure_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + azure_cluster.control_plane.version = "version_value" + azure_cluster.control_plane.ssh_config.authorized_key = "authorized_key_value" + azure_cluster.authorization.admin_users.username = "username_value" + azure_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.CreateAzureClusterRequest( + parent="parent_value", + azure_cluster=azure_cluster, + azure_cluster_id="azure_cluster_id_value", + ) + + # Make the request + operation = client.create_azure_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py new file mode 100644 index 000000000000..d0df4062695c --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_create_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + azure_node_pool = gke_multicloud_v1.AzureNodePool() + azure_node_pool.version = "version_value" + azure_node_pool.config.ssh_config.authorized_key = "authorized_key_value" + azure_node_pool.subnet_id = "subnet_id_value" + azure_node_pool.autoscaling.min_node_count = 1489 + azure_node_pool.autoscaling.max_node_count = 1491 + azure_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.CreateAzureNodePoolRequest( + parent="parent_value", + azure_node_pool=azure_node_pool, + azure_node_pool_id="azure_node_pool_id_value", + ) + + # Make the request + operation = client.create_azure_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_sync.py new file mode 100644 index 000000000000..44aa98ac502e --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_sync.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_create_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + azure_node_pool = gke_multicloud_v1.AzureNodePool() + azure_node_pool.version = "version_value" + azure_node_pool.config.ssh_config.authorized_key = "authorized_key_value" + azure_node_pool.subnet_id = "subnet_id_value" + azure_node_pool.autoscaling.min_node_count = 1489 + azure_node_pool.autoscaling.max_node_count = 1491 + azure_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.CreateAzureNodePoolRequest( + parent="parent_value", + azure_node_pool=azure_node_pool, + azure_node_pool_id="azure_node_pool_id_value", + ) + + # Make the request + operation = client.create_azure_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py new file mode 100644 index 000000000000..0dcac01c8a16 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_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 DeleteAzureClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_delete_azure_client(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAzureClientRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_azure_client(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_sync.py new file mode 100644 index 000000000000..c23c1843de55 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_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 DeleteAzureClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_delete_azure_client(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAzureClientRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_azure_client(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py new file mode 100644 index 000000000000..c554acd1f1b7 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_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 DeleteAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_delete_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAzureClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_azure_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_sync.py new file mode 100644 index 000000000000..c06ff7a76fe0 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_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 DeleteAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_delete_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAzureClusterRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_azure_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py new file mode 100644 index 000000000000..e40cc9bcb9f0 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_delete_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAzureNodePoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_azure_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_sync.py new file mode 100644 index 000000000000..3b8563be4127 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_delete_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.DeleteAzureNodePoolRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_azure_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_async.py new file mode 100644 index 000000000000..39fe81c06d2f --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_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 GenerateAzureAccessToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_generate_azure_access_token(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GenerateAzureAccessTokenRequest( + azure_cluster="azure_cluster_value", + ) + + # Make the request + response = await client.generate_azure_access_token(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_sync.py new file mode 100644 index 000000000000..8119e0a47ec8 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_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 GenerateAzureAccessToken +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_generate_azure_access_token(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GenerateAzureAccessTokenRequest( + azure_cluster="azure_cluster_value", + ) + + # Make the request + response = client.generate_azure_access_token(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_client_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_client_async.py new file mode 100644 index 000000000000..97b456e89307 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_client_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 GetAzureClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_azure_client(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureClientRequest( + name="name_value", + ) + + # Make the request + response = await client.get_azure_client(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_client_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_client_sync.py new file mode 100644 index 000000000000..5db192a85e24 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_client_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 GetAzureClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureClient_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_azure_client(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureClientRequest( + name="name_value", + ) + + # Make the request + response = client.get_azure_client(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureClient_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_async.py new file mode 100644 index 000000000000..f31ff86c52fc --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_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 GetAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureClusterRequest( + name="name_value", + ) + + # Make the request + response = await client.get_azure_cluster(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_sync.py new file mode 100644 index 000000000000..ad968d2e280c --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_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 GetAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureClusterRequest( + name="name_value", + ) + + # Make the request + response = client.get_azure_cluster(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_async.py new file mode 100644 index 000000000000..093d40dfcb8f --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureNodePoolRequest( + name="name_value", + ) + + # Make the request + response = await client.get_azure_node_pool(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_sync.py new file mode 100644 index 000000000000..abbf32bbdf64 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureNodePoolRequest( + name="name_value", + ) + + # Make the request + response = client.get_azure_node_pool(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_async.py new file mode 100644 index 000000000000..b98644c358b2 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_server_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 GetAzureServerConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_get_azure_server_config(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureServerConfigRequest( + name="name_value", + ) + + # Make the request + response = await client.get_azure_server_config(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_sync.py new file mode 100644 index 000000000000..0ed8a9bfd617 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_get_azure_server_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 GetAzureServerConfig +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_get_azure_server_config(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.GetAzureServerConfigRequest( + name="name_value", + ) + + # Make the request + response = client.get_azure_server_config(request=request) + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clients_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clients_async.py new file mode 100644 index 000000000000..0f74d32c3538 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clients_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 ListAzureClients +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_list_azure_clients(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAzureClientsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_azure_clients(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clients_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clients_sync.py new file mode 100644 index 000000000000..c35d7ef9de2e --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clients_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 ListAzureClients +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_ListAzureClients_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_list_azure_clients(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAzureClientsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_azure_clients(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_ListAzureClients_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_async.py new file mode 100644 index 000000000000..9c5b9cf3c845 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_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 ListAzureClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_list_azure_clusters(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAzureClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_azure_clusters(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_sync.py new file mode 100644 index 000000000000..e5283856a439 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_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 ListAzureClusters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_list_azure_clusters(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAzureClustersRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_azure_clusters(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_async.py new file mode 100644 index 000000000000..7cd8efcec297 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAzureNodePools +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_list_azure_node_pools(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAzureNodePoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_azure_node_pools(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_sync.py new file mode 100644 index 000000000000..e835bb37bcea --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAzureNodePools +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_list_azure_node_pools(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + request = gke_multicloud_v1.ListAzureNodePoolsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_azure_node_pools(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py new file mode 100644 index 000000000000..6c4d1dd5b7da --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_update_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + azure_cluster = gke_multicloud_v1.AzureCluster() + azure_cluster.azure_region = "azure_region_value" + azure_cluster.resource_group_id = "resource_group_id_value" + azure_cluster.networking.virtual_network_id = "virtual_network_id_value" + azure_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + azure_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + azure_cluster.control_plane.version = "version_value" + azure_cluster.control_plane.ssh_config.authorized_key = "authorized_key_value" + azure_cluster.authorization.admin_users.username = "username_value" + azure_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.UpdateAzureClusterRequest( + azure_cluster=azure_cluster, + ) + + # Make the request + operation = client.update_azure_cluster(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_sync.py new file mode 100644 index 000000000000..52f18acbabd8 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_sync.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateAzureCluster +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_update_azure_cluster(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + azure_cluster = gke_multicloud_v1.AzureCluster() + azure_cluster.azure_region = "azure_region_value" + azure_cluster.resource_group_id = "resource_group_id_value" + azure_cluster.networking.virtual_network_id = "virtual_network_id_value" + azure_cluster.networking.pod_address_cidr_blocks = ['pod_address_cidr_blocks_value1', 'pod_address_cidr_blocks_value2'] + azure_cluster.networking.service_address_cidr_blocks = ['service_address_cidr_blocks_value1', 'service_address_cidr_blocks_value2'] + azure_cluster.control_plane.version = "version_value" + azure_cluster.control_plane.ssh_config.authorized_key = "authorized_key_value" + azure_cluster.authorization.admin_users.username = "username_value" + azure_cluster.fleet.project = "project_value" + + request = gke_multicloud_v1.UpdateAzureClusterRequest( + azure_cluster=azure_cluster, + ) + + # Make the request + operation = client.update_azure_cluster(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py new file mode 100644 index 000000000000..ed5f41d1b468 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_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 UpdateAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +async def sample_update_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersAsyncClient() + + # Initialize request argument(s) + azure_node_pool = gke_multicloud_v1.AzureNodePool() + azure_node_pool.version = "version_value" + azure_node_pool.config.ssh_config.authorized_key = "authorized_key_value" + azure_node_pool.subnet_id = "subnet_id_value" + azure_node_pool.autoscaling.min_node_count = 1489 + azure_node_pool.autoscaling.max_node_count = 1491 + azure_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.UpdateAzureNodePoolRequest( + azure_node_pool=azure_node_pool, + ) + + # Make the request + operation = client.update_azure_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_async] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_sync.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_sync.py new file mode 100644 index 000000000000..97ee192fa66a --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_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 UpdateAzureNodePool +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-gke-multicloud + + +# [START gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import gke_multicloud_v1 + + +def sample_update_azure_node_pool(): + # Create a client + client = gke_multicloud_v1.AzureClustersClient() + + # Initialize request argument(s) + azure_node_pool = gke_multicloud_v1.AzureNodePool() + azure_node_pool.version = "version_value" + azure_node_pool.config.ssh_config.authorized_key = "authorized_key_value" + azure_node_pool.subnet_id = "subnet_id_value" + azure_node_pool.autoscaling.min_node_count = 1489 + azure_node_pool.autoscaling.max_node_count = 1491 + azure_node_pool.max_pods_constraint.max_pods_per_node = 1798 + + request = gke_multicloud_v1.UpdateAzureNodePoolRequest( + azure_node_pool=azure_node_pool, + ) + + # Make the request + operation = client.update_azure_node_pool(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_sync] diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/snippet_metadata_google.cloud.gkemulticloud.v1.json b/packages/google-cloud-gke-multicloud/samples/generated_samples/snippet_metadata_google.cloud.gkemulticloud.v1.json new file mode 100644 index 000000000000..bc4c7fc98fa3 --- /dev/null +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/snippet_metadata_google.cloud.gkemulticloud.v1.json @@ -0,0 +1,5947 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.gkemulticloud.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-gke-multicloud", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.create_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "CreateAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAttachedClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "attached_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AttachedCluster" + }, + { + "name": "attached_cluster_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_attached_cluster" + }, + "description": "Sample for CreateAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.create_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.CreateAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "CreateAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAttachedClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "attached_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AttachedCluster" + }, + { + "name": "attached_cluster_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_attached_cluster" + }, + "description": "Sample for CreateAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.delete_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "DeleteAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAttachedClusterRequest" + }, + { + "name": "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_attached_cluster" + }, + "description": "Sample for DeleteAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.delete_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.DeleteAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "DeleteAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAttachedClusterRequest" + }, + { + "name": "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_attached_cluster" + }, + "description": "Sample for DeleteAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_DeleteAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.generate_attached_cluster_install_manifest", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "GenerateAttachedClusterInstallManifest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GenerateAttachedClusterInstallManifestRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "attached_cluster_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.gke_multicloud_v1.types.GenerateAttachedClusterInstallManifestResponse", + "shortName": "generate_attached_cluster_install_manifest" + }, + "description": "Sample for GenerateAttachedClusterInstallManifest", + "file": "gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.generate_attached_cluster_install_manifest", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GenerateAttachedClusterInstallManifest", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "GenerateAttachedClusterInstallManifest" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GenerateAttachedClusterInstallManifestRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "attached_cluster_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.gke_multicloud_v1.types.GenerateAttachedClusterInstallManifestResponse", + "shortName": "generate_attached_cluster_install_manifest" + }, + "description": "Sample for GenerateAttachedClusterInstallManifest", + "file": "gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GenerateAttachedClusterInstallManifest_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_attached_clusters_generate_attached_cluster_install_manifest_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.get_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "GetAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAttachedClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AttachedCluster", + "shortName": "get_attached_cluster" + }, + "description": "Sample for GetAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.get_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "GetAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAttachedClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AttachedCluster", + "shortName": "get_attached_cluster" + }, + "description": "Sample for GetAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_get_attached_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.get_attached_server_config", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "GetAttachedServerConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAttachedServerConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AttachedServerConfig", + "shortName": "get_attached_server_config" + }, + "description": "Sample for GetAttachedServerConfig", + "file": "gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_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": "gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.get_attached_server_config", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.GetAttachedServerConfig", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "GetAttachedServerConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAttachedServerConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AttachedServerConfig", + "shortName": "get_attached_server_config" + }, + "description": "Sample for GetAttachedServerConfig", + "file": "gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_GetAttachedServerConfig_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": "gkemulticloud_v1_generated_attached_clusters_get_attached_server_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.import_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "ImportAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ImportAttachedClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "fleet_membership", + "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": "import_attached_cluster" + }, + "description": "Sample for ImportAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.import_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ImportAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "ImportAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ImportAttachedClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "fleet_membership", + "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": "import_attached_cluster" + }, + "description": "Sample for ImportAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ImportAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.list_attached_clusters", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "ListAttachedClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAttachedClustersRequest" + }, + { + "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.gke_multicloud_v1.services.attached_clusters.pagers.ListAttachedClustersAsyncPager", + "shortName": "list_attached_clusters" + }, + "description": "Sample for ListAttachedClusters", + "file": "gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_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": "gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.list_attached_clusters", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.ListAttachedClusters", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "ListAttachedClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAttachedClustersRequest" + }, + { + "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.gke_multicloud_v1.services.attached_clusters.pagers.ListAttachedClustersPager", + "shortName": "list_attached_clusters" + }, + "description": "Sample for ListAttachedClusters", + "file": "gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_ListAttachedClusters_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": "gkemulticloud_v1_generated_attached_clusters_list_attached_clusters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient", + "shortName": "AttachedClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersAsyncClient.update_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "UpdateAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAttachedClusterRequest" + }, + { + "name": "attached_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AttachedCluster" + }, + { + "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_attached_cluster" + }, + "description": "Sample for UpdateAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient", + "shortName": "AttachedClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AttachedClustersClient.update_attached_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters.UpdateAttachedCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AttachedClusters", + "shortName": "AttachedClusters" + }, + "shortName": "UpdateAttachedCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAttachedClusterRequest" + }, + { + "name": "attached_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AttachedCluster" + }, + { + "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_attached_cluster" + }, + "description": "Sample for UpdateAttachedCluster", + "file": "gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AttachedClusters_UpdateAttachedCluster_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": "gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.create_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "CreateAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAwsClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "aws_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AwsCluster" + }, + { + "name": "aws_cluster_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_aws_cluster" + }, + "description": "Sample for CreateAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_async", + "segments": [ + { + "end": 71, + "start": 27, + "type": "FULL" + }, + { + "end": 71, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 61, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 68, + "start": 62, + "type": "REQUEST_EXECUTION" + }, + { + "end": 72, + "start": 69, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.create_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "CreateAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAwsClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "aws_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AwsCluster" + }, + { + "name": "aws_cluster_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_aws_cluster" + }, + "description": "Sample for CreateAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsCluster_sync", + "segments": [ + { + "end": 71, + "start": 27, + "type": "FULL" + }, + { + "end": 71, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 61, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 68, + "start": 62, + "type": "REQUEST_EXECUTION" + }, + { + "end": 72, + "start": 69, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.create_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "CreateAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAwsNodePoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "aws_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AwsNodePool" + }, + { + "name": "aws_node_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_aws_node_pool" + }, + "description": "Sample for CreateAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_async", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.create_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.CreateAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "CreateAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAwsNodePoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "aws_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AwsNodePool" + }, + { + "name": "aws_node_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_aws_node_pool" + }, + "description": "Sample for CreateAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_CreateAwsNodePool_sync", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.delete_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "DeleteAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAwsClusterRequest" + }, + { + "name": "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_aws_cluster" + }, + "description": "Sample for DeleteAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_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": "gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.delete_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "DeleteAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAwsClusterRequest" + }, + { + "name": "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_aws_cluster" + }, + "description": "Sample for DeleteAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsCluster_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": "gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.delete_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "DeleteAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAwsNodePoolRequest" + }, + { + "name": "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_aws_node_pool" + }, + "description": "Sample for DeleteAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_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": "gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.delete_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.DeleteAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "DeleteAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAwsNodePoolRequest" + }, + { + "name": "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_aws_node_pool" + }, + "description": "Sample for DeleteAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_DeleteAwsNodePool_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": "gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.generate_aws_access_token", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessToken", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GenerateAwsAccessToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GenerateAwsAccessTokenRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.GenerateAwsAccessTokenResponse", + "shortName": "generate_aws_access_token" + }, + "description": "Sample for GenerateAwsAccessToken", + "file": "gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_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": "gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.generate_aws_access_token", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GenerateAwsAccessToken", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GenerateAwsAccessToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GenerateAwsAccessTokenRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.GenerateAwsAccessTokenResponse", + "shortName": "generate_aws_access_token" + }, + "description": "Sample for GenerateAwsAccessToken", + "file": "gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GenerateAwsAccessToken_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": "gkemulticloud_v1_generated_aws_clusters_generate_aws_access_token_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.get_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GetAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAwsClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AwsCluster", + "shortName": "get_aws_cluster" + }, + "description": "Sample for GetAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_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": "gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.get_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GetAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAwsClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AwsCluster", + "shortName": "get_aws_cluster" + }, + "description": "Sample for GetAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsCluster_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": "gkemulticloud_v1_generated_aws_clusters_get_aws_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.get_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GetAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAwsNodePoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AwsNodePool", + "shortName": "get_aws_node_pool" + }, + "description": "Sample for GetAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_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": "gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.get_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GetAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAwsNodePoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AwsNodePool", + "shortName": "get_aws_node_pool" + }, + "description": "Sample for GetAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsNodePool_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": "gkemulticloud_v1_generated_aws_clusters_get_aws_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.get_aws_server_config", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GetAwsServerConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAwsServerConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AwsServerConfig", + "shortName": "get_aws_server_config" + }, + "description": "Sample for GetAwsServerConfig", + "file": "gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_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": "gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.get_aws_server_config", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "GetAwsServerConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAwsServerConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AwsServerConfig", + "shortName": "get_aws_server_config" + }, + "description": "Sample for GetAwsServerConfig", + "file": "gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_GetAwsServerConfig_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": "gkemulticloud_v1_generated_aws_clusters_get_aws_server_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.list_aws_clusters", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "ListAwsClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAwsClustersRequest" + }, + { + "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.gke_multicloud_v1.services.aws_clusters.pagers.ListAwsClustersAsyncPager", + "shortName": "list_aws_clusters" + }, + "description": "Sample for ListAwsClusters", + "file": "gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_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": "gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.list_aws_clusters", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsClusters", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "ListAwsClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAwsClustersRequest" + }, + { + "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.gke_multicloud_v1.services.aws_clusters.pagers.ListAwsClustersPager", + "shortName": "list_aws_clusters" + }, + "description": "Sample for ListAwsClusters", + "file": "gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsClusters_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": "gkemulticloud_v1_generated_aws_clusters_list_aws_clusters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.list_aws_node_pools", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "ListAwsNodePools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAwsNodePoolsRequest" + }, + { + "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.gke_multicloud_v1.services.aws_clusters.pagers.ListAwsNodePoolsAsyncPager", + "shortName": "list_aws_node_pools" + }, + "description": "Sample for ListAwsNodePools", + "file": "gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_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": "gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.list_aws_node_pools", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.ListAwsNodePools", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "ListAwsNodePools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAwsNodePoolsRequest" + }, + { + "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.gke_multicloud_v1.services.aws_clusters.pagers.ListAwsNodePoolsPager", + "shortName": "list_aws_node_pools" + }, + "description": "Sample for ListAwsNodePools", + "file": "gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_ListAwsNodePools_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": "gkemulticloud_v1_generated_aws_clusters_list_aws_node_pools_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.update_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "UpdateAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAwsClusterRequest" + }, + { + "name": "aws_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AwsCluster" + }, + { + "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_aws_cluster" + }, + "description": "Sample for UpdateAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_async", + "segments": [ + { + "end": 69, + "start": 27, + "type": "FULL" + }, + { + "end": 69, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 59, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 66, + "start": 60, + "type": "REQUEST_EXECUTION" + }, + { + "end": 70, + "start": 67, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.update_aws_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "UpdateAwsCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAwsClusterRequest" + }, + { + "name": "aws_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AwsCluster" + }, + { + "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_aws_cluster" + }, + "description": "Sample for UpdateAwsCluster", + "file": "gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsCluster_sync", + "segments": [ + { + "end": 69, + "start": 27, + "type": "FULL" + }, + { + "end": 69, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 59, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 66, + "start": 60, + "type": "REQUEST_EXECUTION" + }, + { + "end": 70, + "start": 67, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient", + "shortName": "AwsClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersAsyncClient.update_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "UpdateAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAwsNodePoolRequest" + }, + { + "name": "aws_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AwsNodePool" + }, + { + "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_aws_node_pool" + }, + "description": "Sample for UpdateAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_async", + "segments": [ + { + "end": 64, + "start": 27, + "type": "FULL" + }, + { + "end": 64, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 54, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 61, + "start": 55, + "type": "REQUEST_EXECUTION" + }, + { + "end": 65, + "start": 62, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient", + "shortName": "AwsClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AwsClustersClient.update_aws_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters.UpdateAwsNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AwsClusters", + "shortName": "AwsClusters" + }, + "shortName": "UpdateAwsNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAwsNodePoolRequest" + }, + { + "name": "aws_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AwsNodePool" + }, + { + "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_aws_node_pool" + }, + "description": "Sample for UpdateAwsNodePool", + "file": "gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AwsClusters_UpdateAwsNodePool_sync", + "segments": [ + { + "end": 64, + "start": 27, + "type": "FULL" + }, + { + "end": 64, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 54, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 61, + "start": 55, + "type": "REQUEST_EXECUTION" + }, + { + "end": 65, + "start": 62, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.create_azure_client", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureClient", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "CreateAzureClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAzureClientRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "azure_client", + "type": "google.cloud.gke_multicloud_v1.types.AzureClient" + }, + { + "name": "azure_client_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_azure_client" + }, + "description": "Sample for CreateAzureClient", + "file": "gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_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": "gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.create_azure_client", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureClient", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "CreateAzureClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAzureClientRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "azure_client", + "type": "google.cloud.gke_multicloud_v1.types.AzureClient" + }, + { + "name": "azure_client_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_azure_client" + }, + "description": "Sample for CreateAzureClient", + "file": "gkemulticloud_v1_generated_azure_clusters_create_azure_client_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureClient_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": "gkemulticloud_v1_generated_azure_clusters_create_azure_client_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.create_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "CreateAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAzureClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "azure_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AzureCluster" + }, + { + "name": "azure_cluster_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_azure_cluster" + }, + "description": "Sample for CreateAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_async", + "segments": [ + { + "end": 68, + "start": 27, + "type": "FULL" + }, + { + "end": 68, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 58, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 65, + "start": 59, + "type": "REQUEST_EXECUTION" + }, + { + "end": 69, + "start": 66, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.create_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "CreateAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAzureClusterRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "azure_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AzureCluster" + }, + { + "name": "azure_cluster_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_azure_cluster" + }, + "description": "Sample for CreateAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureCluster_sync", + "segments": [ + { + "end": 68, + "start": 27, + "type": "FULL" + }, + { + "end": 68, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 58, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 65, + "start": 59, + "type": "REQUEST_EXECUTION" + }, + { + "end": 69, + "start": 66, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.create_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "CreateAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAzureNodePoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "azure_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AzureNodePool" + }, + { + "name": "azure_node_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_azure_node_pool" + }, + "description": "Sample for CreateAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_async", + "segments": [ + { + "end": 65, + "start": 27, + "type": "FULL" + }, + { + "end": 65, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 55, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 62, + "start": 56, + "type": "REQUEST_EXECUTION" + }, + { + "end": 66, + "start": 63, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.create_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.CreateAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "CreateAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.CreateAzureNodePoolRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "azure_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AzureNodePool" + }, + { + "name": "azure_node_pool_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_azure_node_pool" + }, + "description": "Sample for CreateAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_CreateAzureNodePool_sync", + "segments": [ + { + "end": 65, + "start": 27, + "type": "FULL" + }, + { + "end": 65, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 55, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 62, + "start": 56, + "type": "REQUEST_EXECUTION" + }, + { + "end": 66, + "start": 63, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.delete_azure_client", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureClient", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "DeleteAzureClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAzureClientRequest" + }, + { + "name": "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_azure_client" + }, + "description": "Sample for DeleteAzureClient", + "file": "gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_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": "gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.delete_azure_client", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureClient", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "DeleteAzureClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAzureClientRequest" + }, + { + "name": "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_azure_client" + }, + "description": "Sample for DeleteAzureClient", + "file": "gkemulticloud_v1_generated_azure_clusters_delete_azure_client_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureClient_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": "gkemulticloud_v1_generated_azure_clusters_delete_azure_client_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.delete_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "DeleteAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAzureClusterRequest" + }, + { + "name": "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_azure_cluster" + }, + "description": "Sample for DeleteAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_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": "gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.delete_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "DeleteAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAzureClusterRequest" + }, + { + "name": "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_azure_cluster" + }, + "description": "Sample for DeleteAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureCluster_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": "gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.delete_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "DeleteAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAzureNodePoolRequest" + }, + { + "name": "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_azure_node_pool" + }, + "description": "Sample for DeleteAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_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": "gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.delete_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.DeleteAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "DeleteAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.DeleteAzureNodePoolRequest" + }, + { + "name": "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_azure_node_pool" + }, + "description": "Sample for DeleteAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_DeleteAzureNodePool_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": "gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.generate_azure_access_token", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GenerateAzureAccessToken", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GenerateAzureAccessToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GenerateAzureAccessTokenRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.GenerateAzureAccessTokenResponse", + "shortName": "generate_azure_access_token" + }, + "description": "Sample for GenerateAzureAccessToken", + "file": "gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_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": "gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.generate_azure_access_token", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GenerateAzureAccessToken", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GenerateAzureAccessToken" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GenerateAzureAccessTokenRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.GenerateAzureAccessTokenResponse", + "shortName": "generate_azure_access_token" + }, + "description": "Sample for GenerateAzureAccessToken", + "file": "gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GenerateAzureAccessToken_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": "gkemulticloud_v1_generated_azure_clusters_generate_azure_access_token_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.get_azure_client", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureClient", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureClientRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureClient", + "shortName": "get_azure_client" + }, + "description": "Sample for GetAzureClient", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_client_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureClient_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_client_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.get_azure_client", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureClient", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureClientRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureClient", + "shortName": "get_azure_client" + }, + "description": "Sample for GetAzureClient", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_client_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureClient_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_client_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.get_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureCluster", + "shortName": "get_azure_cluster" + }, + "description": "Sample for GetAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.get_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureClusterRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureCluster", + "shortName": "get_azure_cluster" + }, + "description": "Sample for GetAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureCluster_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.get_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureNodePoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureNodePool", + "shortName": "get_azure_node_pool" + }, + "description": "Sample for GetAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.get_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureNodePoolRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureNodePool", + "shortName": "get_azure_node_pool" + }, + "description": "Sample for GetAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureNodePool_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_node_pool_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.get_azure_server_config", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureServerConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureServerConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureServerConfig", + "shortName": "get_azure_server_config" + }, + "description": "Sample for GetAzureServerConfig", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.get_azure_server_config", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.GetAzureServerConfig", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "GetAzureServerConfig" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.GetAzureServerConfigRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.gke_multicloud_v1.types.AzureServerConfig", + "shortName": "get_azure_server_config" + }, + "description": "Sample for GetAzureServerConfig", + "file": "gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_GetAzureServerConfig_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": "gkemulticloud_v1_generated_azure_clusters_get_azure_server_config_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.list_azure_clients", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "ListAzureClients" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAzureClientsRequest" + }, + { + "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.gke_multicloud_v1.services.azure_clusters.pagers.ListAzureClientsAsyncPager", + "shortName": "list_azure_clients" + }, + "description": "Sample for ListAzureClients", + "file": "gkemulticloud_v1_generated_azure_clusters_list_azure_clients_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClients_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": "gkemulticloud_v1_generated_azure_clusters_list_azure_clients_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.list_azure_clients", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClients", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "ListAzureClients" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAzureClientsRequest" + }, + { + "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.gke_multicloud_v1.services.azure_clusters.pagers.ListAzureClientsPager", + "shortName": "list_azure_clients" + }, + "description": "Sample for ListAzureClients", + "file": "gkemulticloud_v1_generated_azure_clusters_list_azure_clients_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClients_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": "gkemulticloud_v1_generated_azure_clusters_list_azure_clients_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.list_azure_clusters", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "ListAzureClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAzureClustersRequest" + }, + { + "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.gke_multicloud_v1.services.azure_clusters.pagers.ListAzureClustersAsyncPager", + "shortName": "list_azure_clusters" + }, + "description": "Sample for ListAzureClusters", + "file": "gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_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": "gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.list_azure_clusters", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureClusters", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "ListAzureClusters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAzureClustersRequest" + }, + { + "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.gke_multicloud_v1.services.azure_clusters.pagers.ListAzureClustersPager", + "shortName": "list_azure_clusters" + }, + "description": "Sample for ListAzureClusters", + "file": "gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureClusters_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": "gkemulticloud_v1_generated_azure_clusters_list_azure_clusters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.list_azure_node_pools", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "ListAzureNodePools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAzureNodePoolsRequest" + }, + { + "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.gke_multicloud_v1.services.azure_clusters.pagers.ListAzureNodePoolsAsyncPager", + "shortName": "list_azure_node_pools" + }, + "description": "Sample for ListAzureNodePools", + "file": "gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_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": "gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.list_azure_node_pools", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.ListAzureNodePools", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "ListAzureNodePools" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.ListAzureNodePoolsRequest" + }, + { + "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.gke_multicloud_v1.services.azure_clusters.pagers.ListAzureNodePoolsPager", + "shortName": "list_azure_node_pools" + }, + "description": "Sample for ListAzureNodePools", + "file": "gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_ListAzureNodePools_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": "gkemulticloud_v1_generated_azure_clusters_list_azure_node_pools_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.update_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "UpdateAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAzureClusterRequest" + }, + { + "name": "azure_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AzureCluster" + }, + { + "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_azure_cluster" + }, + "description": "Sample for UpdateAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_async", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.update_azure_cluster", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureCluster", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "UpdateAzureCluster" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAzureClusterRequest" + }, + { + "name": "azure_cluster", + "type": "google.cloud.gke_multicloud_v1.types.AzureCluster" + }, + { + "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_azure_cluster" + }, + "description": "Sample for UpdateAzureCluster", + "file": "gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureCluster_sync", + "segments": [ + { + "end": 66, + "start": 27, + "type": "FULL" + }, + { + "end": 66, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 56, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 57, + "type": "REQUEST_EXECUTION" + }, + { + "end": 67, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient", + "shortName": "AzureClustersAsyncClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersAsyncClient.update_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "UpdateAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAzureNodePoolRequest" + }, + { + "name": "azure_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AzureNodePool" + }, + { + "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_azure_node_pool" + }, + "description": "Sample for UpdateAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_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": "gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient", + "shortName": "AzureClustersClient" + }, + "fullName": "google.cloud.gke_multicloud_v1.AzureClustersClient.update_azure_node_pool", + "method": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters.UpdateAzureNodePool", + "service": { + "fullName": "google.cloud.gkemulticloud.v1.AzureClusters", + "shortName": "AzureClusters" + }, + "shortName": "UpdateAzureNodePool" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.gke_multicloud_v1.types.UpdateAzureNodePoolRequest" + }, + { + "name": "azure_node_pool", + "type": "google.cloud.gke_multicloud_v1.types.AzureNodePool" + }, + { + "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_azure_node_pool" + }, + "description": "Sample for UpdateAzureNodePool", + "file": "gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "gkemulticloud_v1_generated_AzureClusters_UpdateAzureNodePool_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": "gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_sync.py" + } + ] +} diff --git a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py index 44408b2e8a36..6d230fda0a15 100644 --- a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py +++ b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py @@ -2230,9 +2230,11 @@ async def test_list_attached_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_attached_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 diff --git a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py index a8cfeaf3da49..60eefbad63c1 100644 --- a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py +++ b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py @@ -1904,9 +1904,11 @@ async def test_list_aws_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_aws_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 @@ -3527,9 +3529,11 @@ async def test_list_aws_node_pools_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_aws_node_pools(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py index a170f5a18396..9a16ddc28252 100644 --- a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py +++ b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py @@ -1665,9 +1665,11 @@ async def test_list_azure_clients_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_azure_clients(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 @@ -3145,9 +3147,11 @@ async def test_list_azure_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_azure_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 @@ -4776,9 +4780,11 @@ async def test_list_azure_node_pools_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_azure_node_pools(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-iam-logging/google/cloud/iam_logging/gapic_version.py b/packages/google-cloud-iam-logging/google/cloud/iam_logging/gapic_version.py index 8f031bd4dd07..30274cc6e9dd 100644 --- a/packages/google-cloud-iam-logging/google/cloud/iam_logging/gapic_version.py +++ b/packages/google-cloud-iam-logging/google/cloud/iam_logging/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/gapic_version.py b/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/gapic_version.py index 8f031bd4dd07..30274cc6e9dd 100644 --- a/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/gapic_version.py +++ b/packages/google-cloud-iam-logging/google/cloud/iam_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.2.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-iam-logging/noxfile.py b/packages/google-cloud-iam-logging/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-iam-logging/noxfile.py +++ b/packages/google-cloud-iam-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-iap/google/cloud/iap/gapic_version.py b/packages/google-cloud-iap/google/cloud/iap/gapic_version.py index 6f9b28f95196..30274cc6e9dd 100644 --- a/packages/google-cloud-iap/google/cloud/iap/gapic_version.py +++ b/packages/google-cloud-iap/google/cloud/iap/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.10.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-iap/google/cloud/iap_v1/gapic_version.py b/packages/google-cloud-iap/google/cloud/iap_v1/gapic_version.py index 6f9b28f95196..30274cc6e9dd 100644 --- a/packages/google-cloud-iap/google/cloud/iap_v1/gapic_version.py +++ b/packages/google-cloud-iap/google/cloud/iap_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.10.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py b/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py index cf81cea66722..884240c7016f 100644 --- a/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py +++ b/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_admin_service/async_client.py @@ -1328,7 +1328,7 @@ async def sample_update_tunnel_dest_group(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "IdentityAwareProxyAdminServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/async_client.py b/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/async_client.py index d6675fd15855..4c192f0942dc 100644 --- a/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/async_client.py +++ b/packages/google-cloud-iap/google/cloud/iap_v1/services/identity_aware_proxy_o_auth_service/async_client.py @@ -891,7 +891,7 @@ async def sample_delete_identity_aware_proxy_client(): metadata=metadata, ) - async def __aenter__(self): + async def __aenter__(self) -> "IdentityAwareProxyOAuthServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-iap/noxfile.py b/packages/google-cloud-iap/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-iap/noxfile.py +++ b/packages/google-cloud-iap/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-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_async.py new file mode 100644 index 000000000000..4fc10cd024c0 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_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 CreateTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_create_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + tunnel_dest_group = iap_v1.TunnelDestGroup() + tunnel_dest_group.name = "name_value" + + request = iap_v1.CreateTunnelDestGroupRequest( + parent="parent_value", + tunnel_dest_group=tunnel_dest_group, + tunnel_dest_group_id="tunnel_dest_group_id_value", + ) + + # Make the request + response = await client.create_tunnel_dest_group(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_sync.py new file mode 100644 index 000000000000..cd64d90bc66c --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_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 CreateTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_create_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + tunnel_dest_group = iap_v1.TunnelDestGroup() + tunnel_dest_group.name = "name_value" + + request = iap_v1.CreateTunnelDestGroupRequest( + parent="parent_value", + tunnel_dest_group=tunnel_dest_group, + tunnel_dest_group_id="tunnel_dest_group_id_value", + ) + + # Make the request + response = client.create_tunnel_dest_group(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_async.py new file mode 100644 index 000000000000..00f936492417 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_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 DeleteTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_delete_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.DeleteTunnelDestGroupRequest( + name="name_value", + ) + + # Make the request + await client.delete_tunnel_dest_group(request=request) + + +# [END iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_sync.py new file mode 100644 index 000000000000..d5478ca9e9a8 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_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 DeleteTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_delete_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + request = iap_v1.DeleteTunnelDestGroupRequest( + name="name_value", + ) + + # Make the request + client.delete_tunnel_dest_group(request=request) + + +# [END iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_async.py new file mode 100644 index 000000000000..79e1d089b07a --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_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 iap_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # 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 iap_v1_generated_IdentityAwareProxyAdminService_GetIamPolicy_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_sync.py new file mode 100644 index 000000000000..f345c626bf8f --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_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 iap_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # 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 iap_v1_generated_IdentityAwareProxyAdminService_GetIamPolicy_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_async.py new file mode 100644 index 000000000000..4d76f88de09f --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iap_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 GetIapSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_get_iap_settings(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.GetIapSettingsRequest( + name="name_value", + ) + + # Make the request + response = await client.get_iap_settings(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_sync.py new file mode 100644 index 000000000000..18601c5ec536 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_iap_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 GetIapSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_get_iap_settings(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + request = iap_v1.GetIapSettingsRequest( + name="name_value", + ) + + # Make the request + response = client.get_iap_settings(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_async.py new file mode 100644 index 000000000000..2919ffef4f6b --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_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 GetTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_get_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.GetTunnelDestGroupRequest( + name="name_value", + ) + + # Make the request + response = await client.get_tunnel_dest_group(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_sync.py new file mode 100644 index 000000000000..d3fe8f0d21ac --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_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 GetTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_get_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + request = iap_v1.GetTunnelDestGroupRequest( + name="name_value", + ) + + # Make the request + response = client.get_tunnel_dest_group(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_async.py new file mode 100644 index 000000000000..7b986980b7ba --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTunnelDestGroups +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_list_tunnel_dest_groups(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.ListTunnelDestGroupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tunnel_dest_groups(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_sync.py new file mode 100644 index 000000000000..2188921cbdf1 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListTunnelDestGroups +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_list_tunnel_dest_groups(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + request = iap_v1.ListTunnelDestGroupsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_tunnel_dest_groups(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_async.py new file mode 100644 index 000000000000..81f99b4b8066 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_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 iap_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # 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 iap_v1_generated_IdentityAwareProxyAdminService_SetIamPolicy_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_sync.py new file mode 100644 index 000000000000..5cb2861f1850 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SetIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_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 iap_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # 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 iap_v1_generated_IdentityAwareProxyAdminService_SetIamPolicy_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_async.py new file mode 100644 index 000000000000..7ba30d1e746d --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_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 iap_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # 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 iap_v1_generated_IdentityAwareProxyAdminService_TestIamPermissions_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_sync.py new file mode 100644 index 000000000000..6e9cdbf8f307 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for TestIamPermissions +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_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 iap_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # 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 iap_v1_generated_IdentityAwareProxyAdminService_TestIamPermissions_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_async.py new file mode 100644 index 000000000000..1df2f1a0c6fb --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_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 UpdateIapSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_update_iap_settings(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + iap_settings = iap_v1.IapSettings() + iap_settings.name = "name_value" + + request = iap_v1.UpdateIapSettingsRequest( + iap_settings=iap_settings, + ) + + # Make the request + response = await client.update_iap_settings(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_sync.py new file mode 100644 index 000000000000..89f2faf1513c --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_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 UpdateIapSettings +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_update_iap_settings(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + iap_settings = iap_v1.IapSettings() + iap_settings.name = "name_value" + + request = iap_v1.UpdateIapSettingsRequest( + iap_settings=iap_settings, + ) + + # Make the request + response = client.update_iap_settings(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_async.py new file mode 100644 index 000000000000..912ef4c83b5a --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_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 UpdateTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_update_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceAsyncClient() + + # Initialize request argument(s) + tunnel_dest_group = iap_v1.TunnelDestGroup() + tunnel_dest_group.name = "name_value" + + request = iap_v1.UpdateTunnelDestGroupRequest( + tunnel_dest_group=tunnel_dest_group, + ) + + # Make the request + response = await client.update_tunnel_dest_group(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_sync.py new file mode 100644 index 000000000000..41be460d86c0 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_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 UpdateTunnelDestGroup +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_update_tunnel_dest_group(): + # Create a client + client = iap_v1.IdentityAwareProxyAdminServiceClient() + + # Initialize request argument(s) + tunnel_dest_group = iap_v1.TunnelDestGroup() + tunnel_dest_group.name = "name_value" + + request = iap_v1.UpdateTunnelDestGroupRequest( + tunnel_dest_group=tunnel_dest_group, + ) + + # Make the request + response = client.update_tunnel_dest_group(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_async.py new file mode 100644 index 000000000000..1e7e1e01b2cb --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_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 CreateBrand +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_create_brand(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.CreateBrandRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_brand(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_sync.py new file mode 100644 index 000000000000..345f9c9b4ef3 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_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 CreateBrand +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_create_brand(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.CreateBrandRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_brand(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_async.py new file mode 100644 index 000000000000..f96f29dba2ab --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_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 CreateIdentityAwareProxyClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_create_identity_aware_proxy_client(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.CreateIdentityAwareProxyClientRequest( + parent="parent_value", + ) + + # Make the request + response = await client.create_identity_aware_proxy_client(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_sync.py new file mode 100644 index 000000000000..d5472785cf8e --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_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 CreateIdentityAwareProxyClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_create_identity_aware_proxy_client(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.CreateIdentityAwareProxyClientRequest( + parent="parent_value", + ) + + # Make the request + response = client.create_identity_aware_proxy_client(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_async.py new file mode 100644 index 000000000000..2c90da896048 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_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 DeleteIdentityAwareProxyClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_delete_identity_aware_proxy_client(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.DeleteIdentityAwareProxyClientRequest( + name="name_value", + ) + + # Make the request + await client.delete_identity_aware_proxy_client(request=request) + + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_sync.py new file mode 100644 index 000000000000..f2897a9db065 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_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 DeleteIdentityAwareProxyClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_delete_identity_aware_proxy_client(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.DeleteIdentityAwareProxyClientRequest( + name="name_value", + ) + + # Make the request + client.delete_identity_aware_proxy_client(request=request) + + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_async.py new file mode 100644 index 000000000000..1abdb4366f6c --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_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 GetBrand +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_get_brand(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.GetBrandRequest( + name="name_value", + ) + + # Make the request + response = await client.get_brand(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_sync.py new file mode 100644 index 000000000000..c904daeb812a --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_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 GetBrand +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_get_brand(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.GetBrandRequest( + name="name_value", + ) + + # Make the request + response = client.get_brand(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_async.py new file mode 100644 index 000000000000..a318e984eaad --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_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 GetIdentityAwareProxyClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_get_identity_aware_proxy_client(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.GetIdentityAwareProxyClientRequest( + name="name_value", + ) + + # Make the request + response = await client.get_identity_aware_proxy_client(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_sync.py new file mode 100644 index 000000000000..08055bd83ed6 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_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 GetIdentityAwareProxyClient +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_get_identity_aware_proxy_client(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.GetIdentityAwareProxyClientRequest( + name="name_value", + ) + + # Make the request + response = client.get_identity_aware_proxy_client(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_async.py new file mode 100644 index 000000000000..7670dc012180 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_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 ListBrands +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_list_brands(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.ListBrandsRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_brands(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_sync.py new file mode 100644 index 000000000000..ff326822e8a4 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_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 ListBrands +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_list_brands(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.ListBrandsRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_brands(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_async.py new file mode 100644 index 000000000000..4729686a0e68 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_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 ListIdentityAwareProxyClients +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_list_identity_aware_proxy_clients(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.ListIdentityAwareProxyClientsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_identity_aware_proxy_clients(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_sync.py new file mode 100644 index 000000000000..805aa76ba3f0 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_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 ListIdentityAwareProxyClients +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_list_identity_aware_proxy_clients(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.ListIdentityAwareProxyClientsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_identity_aware_proxy_clients(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_async.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_async.py new file mode 100644 index 000000000000..f614fa378d5c --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_async.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResetIdentityAwareProxyClientSecret +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +async def sample_reset_identity_aware_proxy_client_secret(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceAsyncClient() + + # Initialize request argument(s) + request = iap_v1.ResetIdentityAwareProxyClientSecretRequest( + name="name_value", + ) + + # Make the request + response = await client.reset_identity_aware_proxy_client_secret(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_async] diff --git a/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_sync.py b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_sync.py new file mode 100644 index 000000000000..64f617ddc7a1 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_sync.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResetIdentityAwareProxyClientSecret +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-iap + + +# [START iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import iap_v1 + + +def sample_reset_identity_aware_proxy_client_secret(): + # Create a client + client = iap_v1.IdentityAwareProxyOAuthServiceClient() + + # Initialize request argument(s) + request = iap_v1.ResetIdentityAwareProxyClientSecretRequest( + name="name_value", + ) + + # Make the request + response = client.reset_identity_aware_proxy_client_secret(request=request) + + # Handle the response + print(response) + +# [END iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_sync] diff --git a/packages/google-cloud-iap/samples/generated_samples/snippet_metadata_google.cloud.iap.v1.json b/packages/google-cloud-iap/samples/generated_samples/snippet_metadata_google.cloud.iap.v1.json new file mode 100644 index 000000000000..3170bc627f80 --- /dev/null +++ b/packages/google-cloud-iap/samples/generated_samples/snippet_metadata_google.cloud.iap.v1.json @@ -0,0 +1,2821 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.iap.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-iap", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.create_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.CreateTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "CreateTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.CreateTunnelDestGroupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tunnel_dest_group", + "type": "google.cloud.iap_v1.types.TunnelDestGroup" + }, + { + "name": "tunnel_dest_group_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.iap_v1.types.TunnelDestGroup", + "shortName": "create_tunnel_dest_group" + }, + "description": "Sample for CreateTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.create_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.CreateTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "CreateTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.CreateTunnelDestGroupRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "tunnel_dest_group", + "type": "google.cloud.iap_v1.types.TunnelDestGroup" + }, + { + "name": "tunnel_dest_group_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.iap_v1.types.TunnelDestGroup", + "shortName": "create_tunnel_dest_group" + }, + "description": "Sample for CreateTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_CreateTunnelDestGroup_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 50, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 51, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "iap_v1_generated_identity_aware_proxy_admin_service_create_tunnel_dest_group_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.delete_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.DeleteTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "DeleteTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.DeleteTunnelDestGroupRequest" + }, + { + "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_tunnel_dest_group" + }, + "description": "Sample for DeleteTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_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": "iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.delete_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.DeleteTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "DeleteTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.DeleteTunnelDestGroupRequest" + }, + { + "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_tunnel_dest_group" + }, + "description": "Sample for DeleteTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_DeleteTunnelDestGroup_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": "iap_v1_generated_identity_aware_proxy_admin_service_delete_tunnel_dest_group_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.GetIamPolicy", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "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": "iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_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": "iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.get_iam_policy", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.GetIamPolicy", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "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": "iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_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": "iap_v1_generated_identity_aware_proxy_admin_service_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.get_iap_settings", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.GetIapSettings", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "GetIapSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetIapSettingsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IapSettings", + "shortName": "get_iap_settings" + }, + "description": "Sample for GetIapSettings", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_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": "iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.get_iap_settings", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.GetIapSettings", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "GetIapSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetIapSettingsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IapSettings", + "shortName": "get_iap_settings" + }, + "description": "Sample for GetIapSettings", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_GetIapSettings_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": "iap_v1_generated_identity_aware_proxy_admin_service_get_iap_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.get_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.GetTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "GetTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetTunnelDestGroupRequest" + }, + { + "name": "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.iap_v1.types.TunnelDestGroup", + "shortName": "get_tunnel_dest_group" + }, + "description": "Sample for GetTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_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": "iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.get_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.GetTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "GetTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetTunnelDestGroupRequest" + }, + { + "name": "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.iap_v1.types.TunnelDestGroup", + "shortName": "get_tunnel_dest_group" + }, + "description": "Sample for GetTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_GetTunnelDestGroup_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": "iap_v1_generated_identity_aware_proxy_admin_service_get_tunnel_dest_group_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.list_tunnel_dest_groups", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.ListTunnelDestGroups", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "ListTunnelDestGroups" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ListTunnelDestGroupsRequest" + }, + { + "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.iap_v1.services.identity_aware_proxy_admin_service.pagers.ListTunnelDestGroupsAsyncPager", + "shortName": "list_tunnel_dest_groups" + }, + "description": "Sample for ListTunnelDestGroups", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_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": "iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.list_tunnel_dest_groups", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.ListTunnelDestGroups", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "ListTunnelDestGroups" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ListTunnelDestGroupsRequest" + }, + { + "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.iap_v1.services.identity_aware_proxy_admin_service.pagers.ListTunnelDestGroupsPager", + "shortName": "list_tunnel_dest_groups" + }, + "description": "Sample for ListTunnelDestGroups", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_ListTunnelDestGroups_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": "iap_v1_generated_identity_aware_proxy_admin_service_list_tunnel_dest_groups_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.SetIamPolicy", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "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": "iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_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": "iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.set_iam_policy", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.SetIamPolicy", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "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": "iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_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": "iap_v1_generated_identity_aware_proxy_admin_service_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.TestIamPermissions", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "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": "iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_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": "iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.TestIamPermissions", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "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": "iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_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": "iap_v1_generated_identity_aware_proxy_admin_service_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.update_iap_settings", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.UpdateIapSettings", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "UpdateIapSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.UpdateIapSettingsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IapSettings", + "shortName": "update_iap_settings" + }, + "description": "Sample for UpdateIapSettings", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.update_iap_settings", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.UpdateIapSettings", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "UpdateIapSettings" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.UpdateIapSettingsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IapSettings", + "shortName": "update_iap_settings" + }, + "description": "Sample for UpdateIapSettings", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_UpdateIapSettings_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "iap_v1_generated_identity_aware_proxy_admin_service_update_iap_settings_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient", + "shortName": "IdentityAwareProxyAdminServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceAsyncClient.update_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.UpdateTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "UpdateTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.UpdateTunnelDestGroupRequest" + }, + { + "name": "tunnel_dest_group", + "type": "google.cloud.iap_v1.types.TunnelDestGroup" + }, + { + "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.iap_v1.types.TunnelDestGroup", + "shortName": "update_tunnel_dest_group" + }, + "description": "Sample for UpdateTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient", + "shortName": "IdentityAwareProxyAdminServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyAdminServiceClient.update_tunnel_dest_group", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService.UpdateTunnelDestGroup", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyAdminService", + "shortName": "IdentityAwareProxyAdminService" + }, + "shortName": "UpdateTunnelDestGroup" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.UpdateTunnelDestGroupRequest" + }, + { + "name": "tunnel_dest_group", + "type": "google.cloud.iap_v1.types.TunnelDestGroup" + }, + { + "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.iap_v1.types.TunnelDestGroup", + "shortName": "update_tunnel_dest_group" + }, + "description": "Sample for UpdateTunnelDestGroup", + "file": "iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyAdminService_UpdateTunnelDestGroup_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "iap_v1_generated_identity_aware_proxy_admin_service_update_tunnel_dest_group_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.create_brand", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrand", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "CreateBrand" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.CreateBrandRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.Brand", + "shortName": "create_brand" + }, + "description": "Sample for CreateBrand", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.create_brand", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateBrand", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "CreateBrand" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.CreateBrandRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.Brand", + "shortName": "create_brand" + }, + "description": "Sample for CreateBrand", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_CreateBrand_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_brand_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.create_identity_aware_proxy_client", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClient", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "CreateIdentityAwareProxyClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.CreateIdentityAwareProxyClientRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IdentityAwareProxyClient", + "shortName": "create_identity_aware_proxy_client" + }, + "description": "Sample for CreateIdentityAwareProxyClient", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.create_identity_aware_proxy_client", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.CreateIdentityAwareProxyClient", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "CreateIdentityAwareProxyClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.CreateIdentityAwareProxyClientRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IdentityAwareProxyClient", + "shortName": "create_identity_aware_proxy_client" + }, + "description": "Sample for CreateIdentityAwareProxyClient", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_CreateIdentityAwareProxyClient_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_create_identity_aware_proxy_client_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.delete_identity_aware_proxy_client", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClient", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "DeleteIdentityAwareProxyClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.DeleteIdentityAwareProxyClientRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_identity_aware_proxy_client" + }, + "description": "Sample for DeleteIdentityAwareProxyClient", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.delete_identity_aware_proxy_client", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.DeleteIdentityAwareProxyClient", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "DeleteIdentityAwareProxyClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.DeleteIdentityAwareProxyClientRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_identity_aware_proxy_client" + }, + "description": "Sample for DeleteIdentityAwareProxyClient", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_DeleteIdentityAwareProxyClient_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_delete_identity_aware_proxy_client_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.get_brand", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrand", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "GetBrand" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetBrandRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.Brand", + "shortName": "get_brand" + }, + "description": "Sample for GetBrand", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.get_brand", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetBrand", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "GetBrand" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetBrandRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.Brand", + "shortName": "get_brand" + }, + "description": "Sample for GetBrand", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_GetBrand_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_brand_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.get_identity_aware_proxy_client", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClient", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "GetIdentityAwareProxyClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetIdentityAwareProxyClientRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IdentityAwareProxyClient", + "shortName": "get_identity_aware_proxy_client" + }, + "description": "Sample for GetIdentityAwareProxyClient", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.get_identity_aware_proxy_client", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.GetIdentityAwareProxyClient", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "GetIdentityAwareProxyClient" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.GetIdentityAwareProxyClientRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IdentityAwareProxyClient", + "shortName": "get_identity_aware_proxy_client" + }, + "description": "Sample for GetIdentityAwareProxyClient", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_GetIdentityAwareProxyClient_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_get_identity_aware_proxy_client_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.list_brands", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrands", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "ListBrands" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ListBrandsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.ListBrandsResponse", + "shortName": "list_brands" + }, + "description": "Sample for ListBrands", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.list_brands", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListBrands", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "ListBrands" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ListBrandsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.ListBrandsResponse", + "shortName": "list_brands" + }, + "description": "Sample for ListBrands", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_ListBrands_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_brands_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.list_identity_aware_proxy_clients", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClients", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "ListIdentityAwareProxyClients" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ListIdentityAwareProxyClientsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.services.identity_aware_proxy_o_auth_service.pagers.ListIdentityAwareProxyClientsAsyncPager", + "shortName": "list_identity_aware_proxy_clients" + }, + "description": "Sample for ListIdentityAwareProxyClients", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.list_identity_aware_proxy_clients", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.ListIdentityAwareProxyClients", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "ListIdentityAwareProxyClients" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ListIdentityAwareProxyClientsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.services.identity_aware_proxy_o_auth_service.pagers.ListIdentityAwareProxyClientsPager", + "shortName": "list_identity_aware_proxy_clients" + }, + "description": "Sample for ListIdentityAwareProxyClients", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_ListIdentityAwareProxyClients_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_list_identity_aware_proxy_clients_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient", + "shortName": "IdentityAwareProxyOAuthServiceAsyncClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceAsyncClient.reset_identity_aware_proxy_client_secret", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecret", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "ResetIdentityAwareProxyClientSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ResetIdentityAwareProxyClientSecretRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IdentityAwareProxyClient", + "shortName": "reset_identity_aware_proxy_client_secret" + }, + "description": "Sample for ResetIdentityAwareProxyClientSecret", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient", + "shortName": "IdentityAwareProxyOAuthServiceClient" + }, + "fullName": "google.cloud.iap_v1.IdentityAwareProxyOAuthServiceClient.reset_identity_aware_proxy_client_secret", + "method": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService.ResetIdentityAwareProxyClientSecret", + "service": { + "fullName": "google.cloud.iap.v1.IdentityAwareProxyOAuthService", + "shortName": "IdentityAwareProxyOAuthService" + }, + "shortName": "ResetIdentityAwareProxyClientSecret" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.iap_v1.types.ResetIdentityAwareProxyClientSecretRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.iap_v1.types.IdentityAwareProxyClient", + "shortName": "reset_identity_aware_proxy_client_secret" + }, + "description": "Sample for ResetIdentityAwareProxyClientSecret", + "file": "iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "iap_v1_generated_IdentityAwareProxyOAuthService_ResetIdentityAwareProxyClientSecret_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": "iap_v1_generated_identity_aware_proxy_o_auth_service_reset_identity_aware_proxy_client_secret_sync.py" + } + ] +} diff --git a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py index 4a1b6caf5302..ebacab2ac7ad 100644 --- a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py +++ b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py @@ -2027,9 +2027,11 @@ async def test_list_tunnel_dest_groups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_tunnel_dest_groups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py index b246966534b8..418271132c0f 100644 --- a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py +++ b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py @@ -1743,9 +1743,11 @@ async def test_list_identity_aware_proxy_clients_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_identity_aware_proxy_clients(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-ids/CONTRIBUTING.rst b/packages/google-cloud-ids/CONTRIBUTING.rst index 265c274d1d90..2c103d77b97c 100644 --- a/packages/google-cloud-ids/CONTRIBUTING.rst +++ b/packages/google-cloud-ids/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-ids/google/cloud/ids/gapic_version.py b/packages/google-cloud-ids/google/cloud/ids/gapic_version.py index 69ff013987c9..30274cc6e9dd 100644 --- a/packages/google-cloud-ids/google/cloud/ids/gapic_version.py +++ b/packages/google-cloud-ids/google/cloud/ids/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-ids/google/cloud/ids_v1/gapic_version.py b/packages/google-cloud-ids/google/cloud/ids_v1/gapic_version.py index 69ff013987c9..30274cc6e9dd 100644 --- a/packages/google-cloud-ids/google/cloud/ids_v1/gapic_version.py +++ b/packages/google-cloud-ids/google/cloud/ids_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.5.1" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py b/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py index 94dbdf1f1007..5496836bcc2b 100644 --- a/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py +++ b/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py @@ -707,7 +707,7 @@ async def sample_delete_endpoint(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "IDSAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-ids/noxfile.py b/packages/google-cloud-ids/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-ids/noxfile.py +++ b/packages/google-cloud-ids/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-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_async.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_async.py new file mode 100644 index 000000000000..5a56991211ac --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_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 CreateEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_CreateEndpoint_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +async def sample_create_endpoint(): + # Create a client + client = ids_v1.IDSAsyncClient() + + # Initialize request argument(s) + endpoint = ids_v1.Endpoint() + endpoint.network = "network_value" + endpoint.severity = "CRITICAL" + + request = ids_v1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + endpoint=endpoint, + ) + + # Make the request + operation = client.create_endpoint(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END ids_v1_generated_IDS_CreateEndpoint_async] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_sync.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_sync.py new file mode 100644 index 000000000000..43b8bb8f6852 --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_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 CreateEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_CreateEndpoint_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +def sample_create_endpoint(): + # Create a client + client = ids_v1.IDSClient() + + # Initialize request argument(s) + endpoint = ids_v1.Endpoint() + endpoint.network = "network_value" + endpoint.severity = "CRITICAL" + + request = ids_v1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + endpoint=endpoint, + ) + + # Make the request + operation = client.create_endpoint(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END ids_v1_generated_IDS_CreateEndpoint_sync] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_async.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_async.py new file mode 100644 index 000000000000..24d14056002a --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_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 DeleteEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_DeleteEndpoint_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +async def sample_delete_endpoint(): + # Create a client + client = ids_v1.IDSAsyncClient() + + # Initialize request argument(s) + request = ids_v1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_endpoint(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END ids_v1_generated_IDS_DeleteEndpoint_async] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_sync.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_sync.py new file mode 100644 index 000000000000..6b06878e302c --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_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 DeleteEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_DeleteEndpoint_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +def sample_delete_endpoint(): + # Create a client + client = ids_v1.IDSClient() + + # Initialize request argument(s) + request = ids_v1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_endpoint(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END ids_v1_generated_IDS_DeleteEndpoint_sync] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_get_endpoint_async.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_get_endpoint_async.py new file mode 100644 index 000000000000..48b6685d0325 --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_get_endpoint_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 GetEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_GetEndpoint_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +async def sample_get_endpoint(): + # Create a client + client = ids_v1.IDSAsyncClient() + + # Initialize request argument(s) + request = ids_v1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = await client.get_endpoint(request=request) + + # Handle the response + print(response) + +# [END ids_v1_generated_IDS_GetEndpoint_async] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_get_endpoint_sync.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_get_endpoint_sync.py new file mode 100644 index 000000000000..8888a3b8497d --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_get_endpoint_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 GetEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_GetEndpoint_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +def sample_get_endpoint(): + # Create a client + client = ids_v1.IDSClient() + + # Initialize request argument(s) + request = ids_v1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + +# [END ids_v1_generated_IDS_GetEndpoint_sync] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_list_endpoints_async.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_list_endpoints_async.py new file mode 100644 index 000000000000..4bc0ad92fc8f --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_list_endpoints_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 ListEndpoints +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_ListEndpoints_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +async def sample_list_endpoints(): + # Create a client + client = ids_v1.IDSAsyncClient() + + # Initialize request argument(s) + request = ids_v1.ListEndpointsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_endpoints(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END ids_v1_generated_IDS_ListEndpoints_async] diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_list_endpoints_sync.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_list_endpoints_sync.py new file mode 100644 index 000000000000..306719fff7b0 --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_list_endpoints_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 ListEndpoints +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-ids + + +# [START ids_v1_generated_IDS_ListEndpoints_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import ids_v1 + + +def sample_list_endpoints(): + # Create a client + client = ids_v1.IDSClient() + + # Initialize request argument(s) + request = ids_v1.ListEndpointsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_endpoints(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END ids_v1_generated_IDS_ListEndpoints_sync] diff --git a/packages/google-cloud-ids/samples/generated_samples/snippet_metadata_google.cloud.ids.v1.json b/packages/google-cloud-ids/samples/generated_samples/snippet_metadata_google.cloud.ids.v1.json new file mode 100644 index 000000000000..49e7eb64c25f --- /dev/null +++ b/packages/google-cloud-ids/samples/generated_samples/snippet_metadata_google.cloud.ids.v1.json @@ -0,0 +1,675 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.ids.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-ids", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.ids_v1.IDSAsyncClient", + "shortName": "IDSAsyncClient" + }, + "fullName": "google.cloud.ids_v1.IDSAsyncClient.create_endpoint", + "method": { + "fullName": "google.cloud.ids.v1.IDS.CreateEndpoint", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "CreateEndpoint" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.CreateEndpointRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "endpoint", + "type": "google.cloud.ids_v1.types.Endpoint" + }, + { + "name": "endpoint_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_endpoint" + }, + "description": "Sample for CreateEndpoint", + "file": "ids_v1_generated_ids_create_endpoint_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_CreateEndpoint_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": "ids_v1_generated_ids_create_endpoint_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.ids_v1.IDSClient", + "shortName": "IDSClient" + }, + "fullName": "google.cloud.ids_v1.IDSClient.create_endpoint", + "method": { + "fullName": "google.cloud.ids.v1.IDS.CreateEndpoint", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "CreateEndpoint" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.CreateEndpointRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "endpoint", + "type": "google.cloud.ids_v1.types.Endpoint" + }, + { + "name": "endpoint_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_endpoint" + }, + "description": "Sample for CreateEndpoint", + "file": "ids_v1_generated_ids_create_endpoint_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_CreateEndpoint_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": "ids_v1_generated_ids_create_endpoint_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.ids_v1.IDSAsyncClient", + "shortName": "IDSAsyncClient" + }, + "fullName": "google.cloud.ids_v1.IDSAsyncClient.delete_endpoint", + "method": { + "fullName": "google.cloud.ids.v1.IDS.DeleteEndpoint", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "DeleteEndpoint" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.DeleteEndpointRequest" + }, + { + "name": "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_endpoint" + }, + "description": "Sample for DeleteEndpoint", + "file": "ids_v1_generated_ids_delete_endpoint_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_DeleteEndpoint_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": "ids_v1_generated_ids_delete_endpoint_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.ids_v1.IDSClient", + "shortName": "IDSClient" + }, + "fullName": "google.cloud.ids_v1.IDSClient.delete_endpoint", + "method": { + "fullName": "google.cloud.ids.v1.IDS.DeleteEndpoint", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "DeleteEndpoint" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.DeleteEndpointRequest" + }, + { + "name": "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_endpoint" + }, + "description": "Sample for DeleteEndpoint", + "file": "ids_v1_generated_ids_delete_endpoint_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_DeleteEndpoint_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": "ids_v1_generated_ids_delete_endpoint_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.ids_v1.IDSAsyncClient", + "shortName": "IDSAsyncClient" + }, + "fullName": "google.cloud.ids_v1.IDSAsyncClient.get_endpoint", + "method": { + "fullName": "google.cloud.ids.v1.IDS.GetEndpoint", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "GetEndpoint" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.GetEndpointRequest" + }, + { + "name": "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.ids_v1.types.Endpoint", + "shortName": "get_endpoint" + }, + "description": "Sample for GetEndpoint", + "file": "ids_v1_generated_ids_get_endpoint_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_GetEndpoint_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": "ids_v1_generated_ids_get_endpoint_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.ids_v1.IDSClient", + "shortName": "IDSClient" + }, + "fullName": "google.cloud.ids_v1.IDSClient.get_endpoint", + "method": { + "fullName": "google.cloud.ids.v1.IDS.GetEndpoint", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "GetEndpoint" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.GetEndpointRequest" + }, + { + "name": "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.ids_v1.types.Endpoint", + "shortName": "get_endpoint" + }, + "description": "Sample for GetEndpoint", + "file": "ids_v1_generated_ids_get_endpoint_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_GetEndpoint_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": "ids_v1_generated_ids_get_endpoint_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.ids_v1.IDSAsyncClient", + "shortName": "IDSAsyncClient" + }, + "fullName": "google.cloud.ids_v1.IDSAsyncClient.list_endpoints", + "method": { + "fullName": "google.cloud.ids.v1.IDS.ListEndpoints", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "ListEndpoints" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.ListEndpointsRequest" + }, + { + "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.ids_v1.services.ids.pagers.ListEndpointsAsyncPager", + "shortName": "list_endpoints" + }, + "description": "Sample for ListEndpoints", + "file": "ids_v1_generated_ids_list_endpoints_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_ListEndpoints_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": "ids_v1_generated_ids_list_endpoints_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.ids_v1.IDSClient", + "shortName": "IDSClient" + }, + "fullName": "google.cloud.ids_v1.IDSClient.list_endpoints", + "method": { + "fullName": "google.cloud.ids.v1.IDS.ListEndpoints", + "service": { + "fullName": "google.cloud.ids.v1.IDS", + "shortName": "IDS" + }, + "shortName": "ListEndpoints" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.ids_v1.types.ListEndpointsRequest" + }, + { + "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.ids_v1.services.ids.pagers.ListEndpointsPager", + "shortName": "list_endpoints" + }, + "description": "Sample for ListEndpoints", + "file": "ids_v1_generated_ids_list_endpoints_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "ids_v1_generated_IDS_ListEndpoints_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": "ids_v1_generated_ids_list_endpoints_sync.py" + } + ] +} diff --git a/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py b/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py index 25e2b262b534..00dba20234bd 100644 --- a/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py +++ b/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py @@ -1067,9 +1067,11 @@ async def test_list_endpoints_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_endpoints(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-kms-inventory/google/cloud/kms_inventory/gapic_version.py b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory/gapic_version.py +++ b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/gapic_version.py b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/gapic_version.py index 405b1cebcf15..30274cc6e9dd 100644 --- a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/gapic_version.py +++ b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_dashboard_service/async_client.py b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_dashboard_service/async_client.py index f18e750455be..64c6e18c57e1 100644 --- a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_dashboard_service/async_client.py +++ b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_dashboard_service/async_client.py @@ -347,7 +347,7 @@ async def sample_list_crypto_keys(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "KeyDashboardServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_tracking_service/async_client.py b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_tracking_service/async_client.py index d24ccd635bf6..b3f785bf51b7 100644 --- a/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_tracking_service/async_client.py +++ b/packages/google-cloud-kms-inventory/google/cloud/kms_inventory_v1/services/key_tracking_service/async_client.py @@ -469,7 +469,7 @@ async def sample_search_protected_resources(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "KeyTrackingServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-kms-inventory/noxfile.py b/packages/google-cloud-kms-inventory/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-kms-inventory/noxfile.py +++ b/packages/google-cloud-kms-inventory/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-kms-inventory/tests/unit/gapic/kms_inventory_v1/test_key_tracking_service.py b/packages/google-cloud-kms-inventory/tests/unit/gapic/kms_inventory_v1/test_key_tracking_service.py index 22583efca059..fa1626266867 100644 --- a/packages/google-cloud-kms-inventory/tests/unit/gapic/kms_inventory_v1/test_key_tracking_service.py +++ b/packages/google-cloud-kms-inventory/tests/unit/gapic/kms_inventory_v1/test_key_tracking_service.py @@ -1436,9 +1436,11 @@ async def test_search_protected_resources_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.search_protected_resources(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-life-sciences/google/cloud/lifesciences/gapic_version.py b/packages/google-cloud-life-sciences/google/cloud/lifesciences/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-life-sciences/google/cloud/lifesciences/gapic_version.py +++ b/packages/google-cloud-life-sciences/google/cloud/lifesciences/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/gapic_version.py b/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/gapic_version.py index 4c768faa5629..30274cc6e9dd 100644 --- a/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/gapic_version.py +++ b/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.9.2" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py b/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py index 79d6d9b7068d..f2e64cb21284 100644 --- a/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py +++ b/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py @@ -603,7 +603,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "WorkflowsServiceV2BetaAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/rest.py b/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/rest.py index 5de99ddf1bfa..211d13c18fe6 100644 --- a/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/rest.py +++ b/packages/google-cloud-life-sciences/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/rest.py @@ -648,7 +648,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-life-sciences/noxfile.py b/packages/google-cloud-life-sciences/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-life-sciences/noxfile.py +++ b/packages/google-cloud-life-sciences/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-life-sciences/samples/generated_samples/lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_async.py b/packages/google-cloud-life-sciences/samples/generated_samples/lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_async.py new file mode 100644 index 000000000000..dddc2950bc28 --- /dev/null +++ b/packages/google-cloud-life-sciences/samples/generated_samples/lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_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 RunPipeline +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-life-sciences + + +# [START lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import lifesciences_v2beta + + +async def sample_run_pipeline(): + # Create a client + client = lifesciences_v2beta.WorkflowsServiceV2BetaAsyncClient() + + # Initialize request argument(s) + request = lifesciences_v2beta.RunPipelineRequest( + ) + + # Make the request + operation = client.run_pipeline(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_async] diff --git a/packages/google-cloud-life-sciences/samples/generated_samples/lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_sync.py b/packages/google-cloud-life-sciences/samples/generated_samples/lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_sync.py new file mode 100644 index 000000000000..4b0b75e75d1d --- /dev/null +++ b/packages/google-cloud-life-sciences/samples/generated_samples/lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_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 RunPipeline +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-life-sciences + + +# [START lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import lifesciences_v2beta + + +def sample_run_pipeline(): + # Create a client + client = lifesciences_v2beta.WorkflowsServiceV2BetaClient() + + # Initialize request argument(s) + request = lifesciences_v2beta.RunPipelineRequest( + ) + + # Make the request + operation = client.run_pipeline(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_sync] diff --git a/packages/google-cloud-life-sciences/samples/generated_samples/snippet_metadata_google.cloud.lifesciences.v2beta.json b/packages/google-cloud-life-sciences/samples/generated_samples/snippet_metadata_google.cloud.lifesciences.v2beta.json new file mode 100644 index 000000000000..a5f3a0632b0b --- /dev/null +++ b/packages/google-cloud-life-sciences/samples/generated_samples/snippet_metadata_google.cloud.lifesciences.v2beta.json @@ -0,0 +1,168 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.lifesciences.v2beta", + "version": "v2beta" + } + ], + "language": "PYTHON", + "name": "google-cloud-life-sciences", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.lifesciences_v2beta.WorkflowsServiceV2BetaAsyncClient", + "shortName": "WorkflowsServiceV2BetaAsyncClient" + }, + "fullName": "google.cloud.lifesciences_v2beta.WorkflowsServiceV2BetaAsyncClient.run_pipeline", + "method": { + "fullName": "google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta.RunPipeline", + "service": { + "fullName": "google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta", + "shortName": "WorkflowsServiceV2Beta" + }, + "shortName": "RunPipeline" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.lifesciences_v2beta.types.RunPipelineRequest" + }, + { + "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": "run_pipeline" + }, + "description": "Sample for RunPipeline", + "file": "lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_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": "lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.lifesciences_v2beta.WorkflowsServiceV2BetaClient", + "shortName": "WorkflowsServiceV2BetaClient" + }, + "fullName": "google.cloud.lifesciences_v2beta.WorkflowsServiceV2BetaClient.run_pipeline", + "method": { + "fullName": "google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta.RunPipeline", + "service": { + "fullName": "google.cloud.lifesciences.v2beta.WorkflowsServiceV2Beta", + "shortName": "WorkflowsServiceV2Beta" + }, + "shortName": "RunPipeline" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.lifesciences_v2beta.types.RunPipelineRequest" + }, + { + "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": "run_pipeline" + }, + "description": "Sample for RunPipeline", + "file": "lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "lifesciences_v2beta_generated_WorkflowsServiceV2Beta_RunPipeline_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": "lifesciences_v2beta_generated_workflows_service_v2_beta_run_pipeline_sync.py" + } + ] +} diff --git a/packages/google-cloud-managed-identities/google/cloud/managedidentities/gapic_version.py b/packages/google-cloud-managed-identities/google/cloud/managedidentities/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-managed-identities/google/cloud/managedidentities/gapic_version.py +++ b/packages/google-cloud-managed-identities/google/cloud/managedidentities/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-managed-identities/google/cloud/managedidentities_v1/gapic_version.py b/packages/google-cloud-managed-identities/google/cloud/managedidentities_v1/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-managed-identities/google/cloud/managedidentities_v1/gapic_version.py +++ b/packages/google-cloud-managed-identities/google/cloud/managedidentities_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-managed-identities/google/cloud/managedidentities_v1/services/managed_identities_service/async_client.py b/packages/google-cloud-managed-identities/google/cloud/managedidentities_v1/services/managed_identities_service/async_client.py index 004b8c238d89..3768f3d94958 100644 --- a/packages/google-cloud-managed-identities/google/cloud/managedidentities_v1/services/managed_identities_service/async_client.py +++ b/packages/google-cloud-managed-identities/google/cloud/managedidentities_v1/services/managed_identities_service/async_client.py @@ -1569,7 +1569,7 @@ async def sample_validate_trust(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ManagedIdentitiesServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-managed-identities/noxfile.py b/packages/google-cloud-managed-identities/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-managed-identities/noxfile.py +++ b/packages/google-cloud-managed-identities/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-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_attach_trust_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_attach_trust_async.py new file mode 100644 index 000000000000..75c87230954f --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_attach_trust_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 AttachTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_attach_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + trust = managedidentities_v1.Trust() + trust.target_domain_name = "target_domain_name_value" + trust.trust_type = "EXTERNAL" + trust.trust_direction = "BIDIRECTIONAL" + trust.target_dns_ip_addresses = ['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'] + trust.trust_handshake_secret = "trust_handshake_secret_value" + + request = managedidentities_v1.AttachTrustRequest( + name="name_value", + trust=trust, + ) + + # Make the request + operation = client.attach_trust(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_attach_trust_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_attach_trust_sync.py new file mode 100644 index 000000000000..1344e5d77b69 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_attach_trust_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 AttachTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_attach_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + trust = managedidentities_v1.Trust() + trust.target_domain_name = "target_domain_name_value" + trust.trust_type = "EXTERNAL" + trust.trust_direction = "BIDIRECTIONAL" + trust.target_dns_ip_addresses = ['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'] + trust.trust_handshake_secret = "trust_handshake_secret_value" + + request = managedidentities_v1.AttachTrustRequest( + name="name_value", + trust=trust, + ) + + # Make the request + operation = client.attach_trust(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_async.py new file mode 100644 index 000000000000..b67290548e80 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_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 CreateMicrosoftAdDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_create_microsoft_ad_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + domain = managedidentities_v1.Domain() + domain.name = "name_value" + domain.reserved_ip_range = "reserved_ip_range_value" + domain.locations = ['locations_value1', 'locations_value2'] + + request = managedidentities_v1.CreateMicrosoftAdDomainRequest( + parent="parent_value", + domain_name="domain_name_value", + domain=domain, + ) + + # Make the request + operation = client.create_microsoft_ad_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_sync.py new file mode 100644 index 000000000000..50b839a1b610 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_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 CreateMicrosoftAdDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_create_microsoft_ad_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + domain = managedidentities_v1.Domain() + domain.name = "name_value" + domain.reserved_ip_range = "reserved_ip_range_value" + domain.locations = ['locations_value1', 'locations_value2'] + + request = managedidentities_v1.CreateMicrosoftAdDomainRequest( + parent="parent_value", + domain_name="domain_name_value", + domain=domain, + ) + + # Make the request + operation = client.create_microsoft_ad_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_delete_domain_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_delete_domain_async.py new file mode 100644 index 000000000000..1a6b7d0f0070 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_delete_domain_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 DeleteDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_delete_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + request = managedidentities_v1.DeleteDomainRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_delete_domain_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_delete_domain_sync.py new file mode 100644 index 000000000000..fa13686f4c9b --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_delete_domain_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 DeleteDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_delete_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + request = managedidentities_v1.DeleteDomainRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_detach_trust_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_detach_trust_async.py new file mode 100644 index 000000000000..dd4ef6f571a8 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_detach_trust_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 DetachTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_detach_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + trust = managedidentities_v1.Trust() + trust.target_domain_name = "target_domain_name_value" + trust.trust_type = "EXTERNAL" + trust.trust_direction = "BIDIRECTIONAL" + trust.target_dns_ip_addresses = ['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'] + trust.trust_handshake_secret = "trust_handshake_secret_value" + + request = managedidentities_v1.DetachTrustRequest( + name="name_value", + trust=trust, + ) + + # Make the request + operation = client.detach_trust(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_detach_trust_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_detach_trust_sync.py new file mode 100644 index 000000000000..78127c547e98 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_detach_trust_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 DetachTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_detach_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + trust = managedidentities_v1.Trust() + trust.target_domain_name = "target_domain_name_value" + trust.trust_type = "EXTERNAL" + trust.trust_direction = "BIDIRECTIONAL" + trust.target_dns_ip_addresses = ['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'] + trust.trust_handshake_secret = "trust_handshake_secret_value" + + request = managedidentities_v1.DetachTrustRequest( + name="name_value", + trust=trust, + ) + + # Make the request + operation = client.detach_trust(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_get_domain_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_get_domain_async.py new file mode 100644 index 000000000000..67e6283be79e --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_get_domain_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 GetDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_get_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + request = managedidentities_v1.GetDomainRequest( + name="name_value", + ) + + # Make the request + response = await client.get_domain(request=request) + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_get_domain_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_get_domain_sync.py new file mode 100644 index 000000000000..ddbf85b87e17 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_get_domain_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 GetDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_get_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + request = managedidentities_v1.GetDomainRequest( + name="name_value", + ) + + # Make the request + response = client.get_domain(request=request) + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_list_domains_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_list_domains_async.py new file mode 100644 index 000000000000..885f4df8275f --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_list_domains_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 ListDomains +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_list_domains(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + request = managedidentities_v1.ListDomainsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_domains(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_list_domains_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_list_domains_sync.py new file mode 100644 index 000000000000..49408ff12e0d --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_list_domains_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 ListDomains +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_list_domains(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + request = managedidentities_v1.ListDomainsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_domains(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reconfigure_trust_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reconfigure_trust_async.py new file mode 100644 index 000000000000..6979c8c9540f --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reconfigure_trust_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ReconfigureTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_reconfigure_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + request = managedidentities_v1.ReconfigureTrustRequest( + name="name_value", + target_domain_name="target_domain_name_value", + target_dns_ip_addresses=['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'], + ) + + # Make the request + operation = client.reconfigure_trust(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reconfigure_trust_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reconfigure_trust_sync.py new file mode 100644 index 000000000000..b0e32d592b95 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reconfigure_trust_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ReconfigureTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_reconfigure_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + request = managedidentities_v1.ReconfigureTrustRequest( + name="name_value", + target_domain_name="target_domain_name_value", + target_dns_ip_addresses=['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'], + ) + + # Make the request + operation = client.reconfigure_trust(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reset_admin_password_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reset_admin_password_async.py new file mode 100644 index 000000000000..b947580498a8 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reset_admin_password_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 ResetAdminPassword +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_reset_admin_password(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + request = managedidentities_v1.ResetAdminPasswordRequest( + name="name_value", + ) + + # Make the request + response = await client.reset_admin_password(request=request) + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reset_admin_password_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reset_admin_password_sync.py new file mode 100644 index 000000000000..4bf23f111130 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_reset_admin_password_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 ResetAdminPassword +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_reset_admin_password(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + request = managedidentities_v1.ResetAdminPasswordRequest( + name="name_value", + ) + + # Make the request + response = client.reset_admin_password(request=request) + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_update_domain_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_update_domain_async.py new file mode 100644 index 000000000000..78fbce9f66ca --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_update_domain_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 UpdateDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_update_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + domain = managedidentities_v1.Domain() + domain.name = "name_value" + domain.reserved_ip_range = "reserved_ip_range_value" + domain.locations = ['locations_value1', 'locations_value2'] + + request = managedidentities_v1.UpdateDomainRequest( + domain=domain, + ) + + # Make the request + operation = client.update_domain(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_update_domain_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_update_domain_sync.py new file mode 100644 index 000000000000..906006bdeafd --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_update_domain_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 UpdateDomain +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_update_domain(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + domain = managedidentities_v1.Domain() + domain.name = "name_value" + domain.reserved_ip_range = "reserved_ip_range_value" + domain.locations = ['locations_value1', 'locations_value2'] + + request = managedidentities_v1.UpdateDomainRequest( + domain=domain, + ) + + # Make the request + operation = client.update_domain(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_validate_trust_async.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_validate_trust_async.py new file mode 100644 index 000000000000..91adadbe443c --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_validate_trust_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 ValidateTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +async def sample_validate_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceAsyncClient() + + # Initialize request argument(s) + trust = managedidentities_v1.Trust() + trust.target_domain_name = "target_domain_name_value" + trust.trust_type = "EXTERNAL" + trust.trust_direction = "BIDIRECTIONAL" + trust.target_dns_ip_addresses = ['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'] + trust.trust_handshake_secret = "trust_handshake_secret_value" + + request = managedidentities_v1.ValidateTrustRequest( + name="name_value", + trust=trust, + ) + + # Make the request + operation = client.validate_trust(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_async] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_validate_trust_sync.py b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_validate_trust_sync.py new file mode 100644 index 000000000000..b5ec2ea24307 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/managedidentities_v1_generated_managed_identities_service_validate_trust_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 ValidateTrust +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-managed-identities + + +# [START managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import managedidentities_v1 + + +def sample_validate_trust(): + # Create a client + client = managedidentities_v1.ManagedIdentitiesServiceClient() + + # Initialize request argument(s) + trust = managedidentities_v1.Trust() + trust.target_domain_name = "target_domain_name_value" + trust.trust_type = "EXTERNAL" + trust.trust_direction = "BIDIRECTIONAL" + trust.target_dns_ip_addresses = ['target_dns_ip_addresses_value1', 'target_dns_ip_addresses_value2'] + trust.trust_handshake_secret = "trust_handshake_secret_value" + + request = managedidentities_v1.ValidateTrustRequest( + name="name_value", + trust=trust, + ) + + # Make the request + operation = client.validate_trust(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_sync] diff --git a/packages/google-cloud-managed-identities/samples/generated_samples/snippet_metadata_google.cloud.managedidentities.v1.json b/packages/google-cloud-managed-identities/samples/generated_samples/snippet_metadata_google.cloud.managedidentities.v1.json new file mode 100644 index 000000000000..21e96cde5067 --- /dev/null +++ b/packages/google-cloud-managed-identities/samples/generated_samples/snippet_metadata_google.cloud.managedidentities.v1.json @@ -0,0 +1,1689 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.managedidentities.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-managed-identities", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.attach_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.AttachTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "AttachTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.AttachTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "trust", + "type": "google.cloud.managedidentities_v1.types.Trust" + }, + { + "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": "attach_trust" + }, + "description": "Sample for AttachTrust", + "file": "managedidentities_v1_generated_managed_identities_service_attach_trust_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_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": "managedidentities_v1_generated_managed_identities_service_attach_trust_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.attach_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.AttachTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "AttachTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.AttachTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "trust", + "type": "google.cloud.managedidentities_v1.types.Trust" + }, + { + "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": "attach_trust" + }, + "description": "Sample for AttachTrust", + "file": "managedidentities_v1_generated_managed_identities_service_attach_trust_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_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": "managedidentities_v1_generated_managed_identities_service_attach_trust_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.create_microsoft_ad_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.CreateMicrosoftAdDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "CreateMicrosoftAdDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.CreateMicrosoftAdDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "domain_name", + "type": "str" + }, + { + "name": "domain", + "type": "google.cloud.managedidentities_v1.types.Domain" + }, + { + "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_microsoft_ad_domain" + }, + "description": "Sample for CreateMicrosoftAdDomain", + "file": "managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_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": "managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.create_microsoft_ad_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.CreateMicrosoftAdDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "CreateMicrosoftAdDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.CreateMicrosoftAdDomainRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "domain_name", + "type": "str" + }, + { + "name": "domain", + "type": "google.cloud.managedidentities_v1.types.Domain" + }, + { + "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_microsoft_ad_domain" + }, + "description": "Sample for CreateMicrosoftAdDomain", + "file": "managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_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": "managedidentities_v1_generated_managed_identities_service_create_microsoft_ad_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.delete_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.DeleteDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "DeleteDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.DeleteDomainRequest" + }, + { + "name": "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_domain" + }, + "description": "Sample for DeleteDomain", + "file": "managedidentities_v1_generated_managed_identities_service_delete_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_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": "managedidentities_v1_generated_managed_identities_service_delete_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.delete_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.DeleteDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "DeleteDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.DeleteDomainRequest" + }, + { + "name": "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_domain" + }, + "description": "Sample for DeleteDomain", + "file": "managedidentities_v1_generated_managed_identities_service_delete_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_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": "managedidentities_v1_generated_managed_identities_service_delete_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.detach_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.DetachTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "DetachTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.DetachTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "trust", + "type": "google.cloud.managedidentities_v1.types.Trust" + }, + { + "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_trust" + }, + "description": "Sample for DetachTrust", + "file": "managedidentities_v1_generated_managed_identities_service_detach_trust_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_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": "managedidentities_v1_generated_managed_identities_service_detach_trust_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.detach_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.DetachTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "DetachTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.DetachTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "trust", + "type": "google.cloud.managedidentities_v1.types.Trust" + }, + { + "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_trust" + }, + "description": "Sample for DetachTrust", + "file": "managedidentities_v1_generated_managed_identities_service_detach_trust_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_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": "managedidentities_v1_generated_managed_identities_service_detach_trust_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.get_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.GetDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "GetDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.GetDomainRequest" + }, + { + "name": "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.managedidentities_v1.types.Domain", + "shortName": "get_domain" + }, + "description": "Sample for GetDomain", + "file": "managedidentities_v1_generated_managed_identities_service_get_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_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": "managedidentities_v1_generated_managed_identities_service_get_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.get_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.GetDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "GetDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.GetDomainRequest" + }, + { + "name": "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.managedidentities_v1.types.Domain", + "shortName": "get_domain" + }, + "description": "Sample for GetDomain", + "file": "managedidentities_v1_generated_managed_identities_service_get_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_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": "managedidentities_v1_generated_managed_identities_service_get_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.list_domains", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ListDomains", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ListDomains" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ListDomainsRequest" + }, + { + "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.managedidentities_v1.services.managed_identities_service.pagers.ListDomainsAsyncPager", + "shortName": "list_domains" + }, + "description": "Sample for ListDomains", + "file": "managedidentities_v1_generated_managed_identities_service_list_domains_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_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": "managedidentities_v1_generated_managed_identities_service_list_domains_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.list_domains", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ListDomains", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ListDomains" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ListDomainsRequest" + }, + { + "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.managedidentities_v1.services.managed_identities_service.pagers.ListDomainsPager", + "shortName": "list_domains" + }, + "description": "Sample for ListDomains", + "file": "managedidentities_v1_generated_managed_identities_service_list_domains_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_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": "managedidentities_v1_generated_managed_identities_service_list_domains_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.reconfigure_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ReconfigureTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ReconfigureTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ReconfigureTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "target_domain_name", + "type": "str" + }, + { + "name": "target_dns_ip_addresses", + "type": "MutableSequence[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": "reconfigure_trust" + }, + "description": "Sample for ReconfigureTrust", + "file": "managedidentities_v1_generated_managed_identities_service_reconfigure_trust_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "managedidentities_v1_generated_managed_identities_service_reconfigure_trust_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.reconfigure_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ReconfigureTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ReconfigureTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ReconfigureTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "target_domain_name", + "type": "str" + }, + { + "name": "target_dns_ip_addresses", + "type": "MutableSequence[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": "reconfigure_trust" + }, + "description": "Sample for ReconfigureTrust", + "file": "managedidentities_v1_generated_managed_identities_service_reconfigure_trust_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ], + "title": "managedidentities_v1_generated_managed_identities_service_reconfigure_trust_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.reset_admin_password", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ResetAdminPassword", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ResetAdminPassword" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ResetAdminPasswordRequest" + }, + { + "name": "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.managedidentities_v1.types.ResetAdminPasswordResponse", + "shortName": "reset_admin_password" + }, + "description": "Sample for ResetAdminPassword", + "file": "managedidentities_v1_generated_managed_identities_service_reset_admin_password_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_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": "managedidentities_v1_generated_managed_identities_service_reset_admin_password_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.reset_admin_password", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ResetAdminPassword", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ResetAdminPassword" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ResetAdminPasswordRequest" + }, + { + "name": "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.managedidentities_v1.types.ResetAdminPasswordResponse", + "shortName": "reset_admin_password" + }, + "description": "Sample for ResetAdminPassword", + "file": "managedidentities_v1_generated_managed_identities_service_reset_admin_password_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_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": "managedidentities_v1_generated_managed_identities_service_reset_admin_password_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.update_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.UpdateDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "UpdateDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.UpdateDomainRequest" + }, + { + "name": "domain", + "type": "google.cloud.managedidentities_v1.types.Domain" + }, + { + "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_domain" + }, + "description": "Sample for UpdateDomain", + "file": "managedidentities_v1_generated_managed_identities_service_update_domain_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_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": "managedidentities_v1_generated_managed_identities_service_update_domain_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.update_domain", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.UpdateDomain", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "UpdateDomain" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.UpdateDomainRequest" + }, + { + "name": "domain", + "type": "google.cloud.managedidentities_v1.types.Domain" + }, + { + "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_domain" + }, + "description": "Sample for UpdateDomain", + "file": "managedidentities_v1_generated_managed_identities_service_update_domain_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_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": "managedidentities_v1_generated_managed_identities_service_update_domain_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient", + "shortName": "ManagedIdentitiesServiceAsyncClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceAsyncClient.validate_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ValidateTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ValidateTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ValidateTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "trust", + "type": "google.cloud.managedidentities_v1.types.Trust" + }, + { + "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": "validate_trust" + }, + "description": "Sample for ValidateTrust", + "file": "managedidentities_v1_generated_managed_identities_service_validate_trust_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_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": "managedidentities_v1_generated_managed_identities_service_validate_trust_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient", + "shortName": "ManagedIdentitiesServiceClient" + }, + "fullName": "google.cloud.managedidentities_v1.ManagedIdentitiesServiceClient.validate_trust", + "method": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService.ValidateTrust", + "service": { + "fullName": "google.cloud.managedidentities.v1.ManagedIdentitiesService", + "shortName": "ManagedIdentitiesService" + }, + "shortName": "ValidateTrust" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.managedidentities_v1.types.ValidateTrustRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "trust", + "type": "google.cloud.managedidentities_v1.types.Trust" + }, + { + "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": "validate_trust" + }, + "description": "Sample for ValidateTrust", + "file": "managedidentities_v1_generated_managed_identities_service_validate_trust_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_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": "managedidentities_v1_generated_managed_identities_service_validate_trust_sync.py" + } + ] +} diff --git a/packages/google-cloud-managed-identities/tests/unit/gapic/managedidentities_v1/test_managed_identities_service.py b/packages/google-cloud-managed-identities/tests/unit/gapic/managedidentities_v1/test_managed_identities_service.py index ad7d6e5e98ea..02de29ec6305 100644 --- a/packages/google-cloud-managed-identities/tests/unit/gapic/managedidentities_v1/test_managed_identities_service.py +++ b/packages/google-cloud-managed-identities/tests/unit/gapic/managedidentities_v1/test_managed_identities_service.py @@ -1648,9 +1648,11 @@ async def test_list_domains_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_domains(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-media-translation/google/cloud/mediatranslation/gapic_version.py b/packages/google-cloud-media-translation/google/cloud/mediatranslation/gapic_version.py index d8ae9e009f6a..30274cc6e9dd 100644 --- a/packages/google-cloud-media-translation/google/cloud/mediatranslation/gapic_version.py +++ b/packages/google-cloud-media-translation/google/cloud/mediatranslation/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-cloud-media-translation/google/cloud/mediatranslation_v1beta1/gapic_version.py b/packages/google-cloud-media-translation/google/cloud/mediatranslation_v1beta1/gapic_version.py index d8ae9e009f6a..30274cc6e9dd 100644 --- a/packages/google-cloud-media-translation/google/cloud/mediatranslation_v1beta1/gapic_version.py +++ b/packages/google-cloud-media-translation/google/cloud/mediatranslation_v1beta1/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-cloud-media-translation/google/cloud/mediatranslation_v1beta1/services/speech_translation_service/async_client.py b/packages/google-cloud-media-translation/google/cloud/mediatranslation_v1beta1/services/speech_translation_service/async_client.py index c83a393a91c8..cf393962fcda 100644 --- a/packages/google-cloud-media-translation/google/cloud/mediatranslation_v1beta1/services/speech_translation_service/async_client.py +++ b/packages/google-cloud-media-translation/google/cloud/mediatranslation_v1beta1/services/speech_translation_service/async_client.py @@ -319,7 +319,7 @@ def request_generator(): # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SpeechTranslationServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-media-translation/noxfile.py b/packages/google-cloud-media-translation/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-media-translation/noxfile.py +++ b/packages/google-cloud-media-translation/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-media-translation/samples/generated_samples/mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_async.py b/packages/google-cloud-media-translation/samples/generated_samples/mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_async.py new file mode 100644 index 000000000000..4c9f0c82eee3 --- /dev/null +++ b/packages/google-cloud-media-translation/samples/generated_samples/mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_async.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StreamingTranslateSpeech +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-media-translation + + +# [START mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import mediatranslation_v1beta1 + + +async def sample_streaming_translate_speech(): + # Create a client + client = mediatranslation_v1beta1.SpeechTranslationServiceAsyncClient() + + # Initialize request argument(s) + streaming_config = mediatranslation_v1beta1.StreamingTranslateSpeechConfig() + streaming_config.audio_config.audio_encoding = "audio_encoding_value" + streaming_config.audio_config.source_language_code = "source_language_code_value" + streaming_config.audio_config.target_language_code = "target_language_code_value" + + request = mediatranslation_v1beta1.StreamingTranslateSpeechRequest( + streaming_config=streaming_config, + ) + + # This method expects an iterator which contains + # 'mediatranslation_v1beta1.StreamingTranslateSpeechRequest' 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.streaming_translate_speech(requests=request_generator()) + + # Handle the response + async for response in stream: + print(response) + +# [END mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_async] diff --git a/packages/google-cloud-media-translation/samples/generated_samples/mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_sync.py b/packages/google-cloud-media-translation/samples/generated_samples/mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_sync.py new file mode 100644 index 000000000000..8b612a5139fd --- /dev/null +++ b/packages/google-cloud-media-translation/samples/generated_samples/mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_sync.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StreamingTranslateSpeech +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-media-translation + + +# [START mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import mediatranslation_v1beta1 + + +def sample_streaming_translate_speech(): + # Create a client + client = mediatranslation_v1beta1.SpeechTranslationServiceClient() + + # Initialize request argument(s) + streaming_config = mediatranslation_v1beta1.StreamingTranslateSpeechConfig() + streaming_config.audio_config.audio_encoding = "audio_encoding_value" + streaming_config.audio_config.source_language_code = "source_language_code_value" + streaming_config.audio_config.target_language_code = "target_language_code_value" + + request = mediatranslation_v1beta1.StreamingTranslateSpeechRequest( + streaming_config=streaming_config, + ) + + # This method expects an iterator which contains + # 'mediatranslation_v1beta1.StreamingTranslateSpeechRequest' 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.streaming_translate_speech(requests=request_generator()) + + # Handle the response + for response in stream: + print(response) + +# [END mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync] diff --git a/packages/google-cloud-media-translation/samples/generated_samples/snippet_metadata_google.cloud.mediatranslation.v1beta1.json b/packages/google-cloud-media-translation/samples/generated_samples/snippet_metadata_google.cloud.mediatranslation.v1beta1.json new file mode 100644 index 000000000000..53086cedf83d --- /dev/null +++ b/packages/google-cloud-media-translation/samples/generated_samples/snippet_metadata_google.cloud.mediatranslation.v1beta1.json @@ -0,0 +1,168 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.mediatranslation.v1beta1", + "version": "v1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-media-translation", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.mediatranslation_v1beta1.SpeechTranslationServiceAsyncClient", + "shortName": "SpeechTranslationServiceAsyncClient" + }, + "fullName": "google.cloud.mediatranslation_v1beta1.SpeechTranslationServiceAsyncClient.streaming_translate_speech", + "method": { + "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech", + "service": { + "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService", + "shortName": "SpeechTranslationService" + }, + "shortName": "StreamingTranslateSpeech" + }, + "parameters": [ + { + "name": "requests", + "type": "Iterator[google.cloud.mediatranslation_v1beta1.types.StreamingTranslateSpeechRequest]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "Iterable[google.cloud.mediatranslation_v1beta1.types.StreamingTranslateSpeechResponse]", + "shortName": "streaming_translate_speech" + }, + "description": "Sample for StreamingTranslateSpeech", + "file": "mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_async", + "segments": [ + { + "end": 67, + "start": 27, + "type": "FULL" + }, + { + "end": 67, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 60, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 61, + "type": "REQUEST_EXECUTION" + }, + { + "end": 68, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.mediatranslation_v1beta1.SpeechTranslationServiceClient", + "shortName": "SpeechTranslationServiceClient" + }, + "fullName": "google.cloud.mediatranslation_v1beta1.SpeechTranslationServiceClient.streaming_translate_speech", + "method": { + "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech", + "service": { + "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService", + "shortName": "SpeechTranslationService" + }, + "shortName": "StreamingTranslateSpeech" + }, + "parameters": [ + { + "name": "requests", + "type": "Iterator[google.cloud.mediatranslation_v1beta1.types.StreamingTranslateSpeechRequest]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "Iterable[google.cloud.mediatranslation_v1beta1.types.StreamingTranslateSpeechResponse]", + "shortName": "streaming_translate_speech" + }, + "description": "Sample for StreamingTranslateSpeech", + "file": "mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync", + "segments": [ + { + "end": 67, + "start": 27, + "type": "FULL" + }, + { + "end": 67, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 60, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 63, + "start": 61, + "type": "REQUEST_EXECUTION" + }, + { + "end": 68, + "start": 64, + "type": "RESPONSE_HANDLING" + } + ], + "title": "mediatranslation_v1beta1_generated_speech_translation_service_streaming_translate_speech_sync.py" + } + ] +} diff --git a/packages/google-cloud-memcache/google/cloud/memcache/gapic_version.py b/packages/google-cloud-memcache/google/cloud/memcache/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache/gapic_version.py +++ b/packages/google-cloud-memcache/google/cloud/memcache/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-memcache/google/cloud/memcache_v1/gapic_version.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1/gapic_version.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_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-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py index 4be06f59cb13..de5a262817c8 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py @@ -1629,7 +1629,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CloudMemcacheAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/rest.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/rest.py index 1a796782a6bc..f48f0eb332bd 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/rest.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/rest.py @@ -1631,7 +1631,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-memcache/google/cloud/memcache_v1beta2/gapic_version.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/gapic_version.py index 84856f09232b..30274cc6e9dd 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/gapic_version.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/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-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py index 37f3efe20864..0fbadafbd2e0 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py @@ -1776,7 +1776,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "CloudMemcacheAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/rest.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/rest.py index fc45c4d4a5ce..bc6ad39c3a5d 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/rest.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/rest.py @@ -1771,7 +1771,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-memcache/noxfile.py b/packages/google-cloud-memcache/noxfile.py index 1749edb5dad7..369d391524fc 100644 --- a/packages/google-cloud-memcache/noxfile.py +++ b/packages/google-cloud-memcache/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-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_async.py new file mode 100644 index 000000000000..4d7ed2e41699 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_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 ApplyParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1_generated_CloudMemcache_ApplyParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1 + + +async def sample_apply_parameters(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1.ApplyParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.apply_parameters(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_ApplyParameters_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_sync.py new file mode 100644 index 000000000000..48563003391b --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_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 ApplyParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1_generated_CloudMemcache_ApplyParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1 + + +def sample_apply_parameters(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1.ApplyParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.apply_parameters(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_ApplyParameters_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_async.py new file mode 100644 index 000000000000..3e8e97d19885 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_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 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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +async def sample_create_instance(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + instance = memcache_v1.Instance() + instance.name = "name_value" + instance.node_count = 1070 + instance.node_config.cpu_count = 976 + instance.node_config.memory_size_mb = 1505 + + request = memcache_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 memcache_v1_generated_CloudMemcache_CreateInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_sync.py new file mode 100644 index 000000000000..b3e377927d66 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_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 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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +def sample_create_instance(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + instance = memcache_v1.Instance() + instance.name = "name_value" + instance.node_count = 1070 + instance.node_config.cpu_count = 976 + instance.node_config.memory_size_mb = 1505 + + request = memcache_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 memcache_v1_generated_CloudMemcache_CreateInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_async.py new file mode 100644 index 000000000000..c74323e94c40 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +async def sample_delete_instance(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_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 memcache_v1_generated_CloudMemcache_DeleteInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_sync.py new file mode 100644 index 000000000000..07a52fb38db6 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +def sample_delete_instance(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_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 memcache_v1_generated_CloudMemcache_DeleteInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_get_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_get_instance_async.py new file mode 100644 index 000000000000..83a14bbc6c73 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +async def sample_get_instance(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_GetInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_get_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_get_instance_sync.py new file mode 100644 index 000000000000..968c860657e9 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +def sample_get_instance(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_GetInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_list_instances_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_list_instances_async.py new file mode 100644 index 000000000000..0b03e65174cd --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +async def sample_list_instances(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END memcache_v1_generated_CloudMemcache_ListInstances_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_list_instances_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_list_instances_sync.py new file mode 100644 index 000000000000..33af66ef75dc --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +def sample_list_instances(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1.ListInstancesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_instances(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END memcache_v1_generated_CloudMemcache_ListInstances_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py new file mode 100644 index 000000000000..11b87445d214 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RescheduleMaintenance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1_generated_CloudMemcache_RescheduleMaintenance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1 + + +async def sample_reschedule_maintenance(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1.RescheduleMaintenanceRequest( + instance="instance_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_RescheduleMaintenance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_sync.py new file mode 100644 index 000000000000..821c80eca47c --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RescheduleMaintenance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1_generated_CloudMemcache_RescheduleMaintenance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1 + + +def sample_reschedule_maintenance(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1.RescheduleMaintenanceRequest( + instance="instance_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_RescheduleMaintenance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_async.py new file mode 100644 index 000000000000..257fc1590b61 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_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 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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +async def sample_update_instance(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + instance = memcache_v1.Instance() + instance.name = "name_value" + instance.node_count = 1070 + instance.node_config.cpu_count = 976 + instance.node_config.memory_size_mb = 1505 + + request = memcache_v1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_UpdateInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_sync.py new file mode 100644 index 000000000000..bfe196593045 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_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 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-memcache + + +# [START memcache_v1_generated_CloudMemcache_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 memcache_v1 + + +def sample_update_instance(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + instance = memcache_v1.Instance() + instance.name = "name_value" + instance.node_count = 1070 + instance.node_config.cpu_count = 976 + instance.node_config.memory_size_mb = 1505 + + request = memcache_v1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_UpdateInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_async.py new file mode 100644 index 000000000000..94949ec578ef --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_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 UpdateParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1_generated_CloudMemcache_UpdateParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1 + + +async def sample_update_parameters(): + # Create a client + client = memcache_v1.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1.UpdateParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.update_parameters(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_UpdateParameters_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_sync.py new file mode 100644 index 000000000000..c78b6676fbfd --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_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 UpdateParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1_generated_CloudMemcache_UpdateParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1 + + +def sample_update_parameters(): + # Create a client + client = memcache_v1.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1.UpdateParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.update_parameters(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1_generated_CloudMemcache_UpdateParameters_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py new file mode 100644 index 000000000000..e2f69e79b1fd --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_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 ApplyParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_ApplyParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +async def sample_apply_parameters(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.ApplyParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.apply_parameters(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_ApplyParameters_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_sync.py new file mode 100644 index 000000000000..5e38aaff5fe2 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_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 ApplyParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_ApplyParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +def sample_apply_parameters(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.ApplyParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.apply_parameters(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_ApplyParameters_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py new file mode 100644 index 000000000000..23486a72575f --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_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 ApplySoftwareUpdate +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +async def sample_apply_software_update(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.ApplySoftwareUpdateRequest( + instance="instance_value", + ) + + # Make the request + operation = client.apply_software_update(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_sync.py new file mode 100644 index 000000000000..1a06e32eeac2 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_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 ApplySoftwareUpdate +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +def sample_apply_software_update(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.ApplySoftwareUpdateRequest( + instance="instance_value", + ) + + # Make the request + operation = client.apply_software_update(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_async.py new file mode 100644 index 000000000000..bba1842947f7 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_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 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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +async def sample_create_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + resource = memcache_v1beta2.Instance() + resource.name = "name_value" + resource.node_count = 1070 + resource.node_config.cpu_count = 976 + resource.node_config.memory_size_mb = 1505 + + request = memcache_v1beta2.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + resource=resource, + ) + + # 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 memcache_v1beta2_generated_CloudMemcache_CreateInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_sync.py new file mode 100644 index 000000000000..68d4a3b420f9 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_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 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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +def sample_create_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + resource = memcache_v1beta2.Instance() + resource.name = "name_value" + resource.node_count = 1070 + resource.node_config.cpu_count = 976 + resource.node_config.memory_size_mb = 1505 + + request = memcache_v1beta2.CreateInstanceRequest( + parent="parent_value", + instance_id="instance_id_value", + resource=resource, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_CreateInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py new file mode 100644 index 000000000000..90e9057deac4 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +async def sample_delete_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.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 memcache_v1beta2_generated_CloudMemcache_DeleteInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_sync.py new file mode 100644 index 000000000000..af3c4b351921 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +def sample_delete_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.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 memcache_v1beta2_generated_CloudMemcache_DeleteInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_get_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_get_instance_async.py new file mode 100644 index 000000000000..16fbc6d6f8b8 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +async def sample_get_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_instance(request=request) + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_GetInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_get_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_get_instance_sync.py new file mode 100644 index 000000000000..b0ff048c4936 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +def sample_get_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.GetInstanceRequest( + name="name_value", + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_GetInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_list_instances_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_list_instances_async.py new file mode 100644 index 000000000000..e2feb2dc11cb --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +async def sample_list_instances(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.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 memcache_v1beta2_generated_CloudMemcache_ListInstances_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_list_instances_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_list_instances_sync.py new file mode 100644 index 000000000000..96eec1baa22c --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +def sample_list_instances(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.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 memcache_v1beta2_generated_CloudMemcache_ListInstances_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py new file mode 100644 index 000000000000..c700a673409d --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RescheduleMaintenance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_RescheduleMaintenance_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +async def sample_reschedule_maintenance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.RescheduleMaintenanceRequest( + instance="instance_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_RescheduleMaintenance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_sync.py new file mode 100644 index 000000000000..20b2f08edfdf --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_sync.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for RescheduleMaintenance +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_RescheduleMaintenance_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +def sample_reschedule_maintenance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.RescheduleMaintenanceRequest( + instance="instance_value", + reschedule_type="SPECIFIC_TIME", + ) + + # Make the request + operation = client.reschedule_maintenance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_RescheduleMaintenance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_async.py new file mode 100644 index 000000000000..f401e3a510a5 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_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 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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +async def sample_update_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + resource = memcache_v1beta2.Instance() + resource.name = "name_value" + resource.node_count = 1070 + resource.node_config.cpu_count = 976 + resource.node_config.memory_size_mb = 1505 + + request = memcache_v1beta2.UpdateInstanceRequest( + resource=resource, + ) + + # 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 memcache_v1beta2_generated_CloudMemcache_UpdateInstance_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_sync.py new file mode 100644 index 000000000000..f1e71df0917a --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_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 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-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_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 memcache_v1beta2 + + +def sample_update_instance(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + resource = memcache_v1beta2.Instance() + resource.name = "name_value" + resource.node_count = 1070 + resource.node_config.cpu_count = 976 + resource.node_config.memory_size_mb = 1505 + + request = memcache_v1beta2.UpdateInstanceRequest( + resource=resource, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_UpdateInstance_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py new file mode 100644 index 000000000000..4606935186b9 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_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 UpdateParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_UpdateParameters_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +async def sample_update_parameters(): + # Create a client + client = memcache_v1beta2.CloudMemcacheAsyncClient() + + # Initialize request argument(s) + request = memcache_v1beta2.UpdateParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.update_parameters(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_UpdateParameters_async] diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_sync.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_sync.py new file mode 100644 index 000000000000..00013aa1eacb --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_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 UpdateParameters +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-memcache + + +# [START memcache_v1beta2_generated_CloudMemcache_UpdateParameters_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import memcache_v1beta2 + + +def sample_update_parameters(): + # Create a client + client = memcache_v1beta2.CloudMemcacheClient() + + # Initialize request argument(s) + request = memcache_v1beta2.UpdateParametersRequest( + name="name_value", + ) + + # Make the request + operation = client.update_parameters(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END memcache_v1beta2_generated_CloudMemcache_UpdateParameters_sync] diff --git a/packages/google-cloud-memcache/samples/generated_samples/snippet_metadata_google.cloud.memcache.v1.json b/packages/google-cloud-memcache/samples/generated_samples/snippet_metadata_google.cloud.memcache.v1.json new file mode 100644 index 000000000000..4fbe6f0f3a20 --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/snippet_metadata_google.cloud.memcache.v1.json @@ -0,0 +1,1375 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.memcache.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-memcache", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.apply_parameters", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.ApplyParameters", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ApplyParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.ApplyParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "node_ids", + "type": "MutableSequence[str]" + }, + { + "name": "apply_all", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "apply_parameters" + }, + "description": "Sample for ApplyParameters", + "file": "memcache_v1_generated_cloud_memcache_apply_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_ApplyParameters_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": "memcache_v1_generated_cloud_memcache_apply_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.apply_parameters", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.ApplyParameters", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ApplyParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.ApplyParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "node_ids", + "type": "MutableSequence[str]" + }, + { + "name": "apply_all", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "apply_parameters" + }, + "description": "Sample for ApplyParameters", + "file": "memcache_v1_generated_cloud_memcache_apply_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_ApplyParameters_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": "memcache_v1_generated_cloud_memcache_apply_parameters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.CreateInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.memcache_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": "memcache_v1_generated_cloud_memcache_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_CreateInstance_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": "memcache_v1_generated_cloud_memcache_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.create_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.CreateInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance", + "type": "google.cloud.memcache_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": "memcache_v1_generated_cloud_memcache_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_CreateInstance_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": "memcache_v1_generated_cloud_memcache_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.DeleteInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_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": "memcache_v1_generated_cloud_memcache_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_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": "memcache_v1_generated_cloud_memcache_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.delete_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.DeleteInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_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": "memcache_v1_generated_cloud_memcache_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_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": "memcache_v1_generated_cloud_memcache_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.GetInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_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.memcache_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "memcache_v1_generated_cloud_memcache_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_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": "memcache_v1_generated_cloud_memcache_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.get_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.GetInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_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.memcache_v1.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "memcache_v1_generated_cloud_memcache_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_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": "memcache_v1_generated_cloud_memcache_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.ListInstances", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.memcache_v1.services.cloud_memcache.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "memcache_v1_generated_cloud_memcache_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_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": "memcache_v1_generated_cloud_memcache_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.list_instances", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.ListInstances", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.ListInstancesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.memcache_v1.services.cloud_memcache.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "memcache_v1_generated_cloud_memcache_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_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": "memcache_v1_generated_cloud_memcache_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.RescheduleMaintenanceRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.memcache_v1.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_RescheduleMaintenance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.RescheduleMaintenanceRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.memcache_v1.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "memcache_v1_generated_cloud_memcache_reschedule_maintenance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_RescheduleMaintenance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "memcache_v1_generated_cloud_memcache_reschedule_maintenance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.update_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.UpdateInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.UpdateInstanceRequest" + }, + { + "name": "instance", + "type": "google.cloud.memcache_v1.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": "memcache_v1_generated_cloud_memcache_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_UpdateInstance_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": "memcache_v1_generated_cloud_memcache_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.update_instance", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.UpdateInstance", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.UpdateInstanceRequest" + }, + { + "name": "instance", + "type": "google.cloud.memcache_v1.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": "memcache_v1_generated_cloud_memcache_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_UpdateInstance_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": "memcache_v1_generated_cloud_memcache_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheAsyncClient.update_parameters", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.UpdateParameters", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.UpdateParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "parameters", + "type": "google.cloud.memcache_v1.types.MemcacheParameters" + }, + { + "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_parameters" + }, + "description": "Sample for UpdateParameters", + "file": "memcache_v1_generated_cloud_memcache_update_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_UpdateParameters_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": "memcache_v1_generated_cloud_memcache_update_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1.CloudMemcacheClient.update_parameters", + "method": { + "fullName": "google.cloud.memcache.v1.CloudMemcache.UpdateParameters", + "service": { + "fullName": "google.cloud.memcache.v1.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1.types.UpdateParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "parameters", + "type": "google.cloud.memcache_v1.types.MemcacheParameters" + }, + { + "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_parameters" + }, + "description": "Sample for UpdateParameters", + "file": "memcache_v1_generated_cloud_memcache_update_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1_generated_CloudMemcache_UpdateParameters_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": "memcache_v1_generated_cloud_memcache_update_parameters_sync.py" + } + ] +} diff --git a/packages/google-cloud-memcache/samples/generated_samples/snippet_metadata_google.cloud.memcache.v1beta2.json b/packages/google-cloud-memcache/samples/generated_samples/snippet_metadata_google.cloud.memcache.v1beta2.json new file mode 100644 index 000000000000..a19a59a135cf --- /dev/null +++ b/packages/google-cloud-memcache/samples/generated_samples/snippet_metadata_google.cloud.memcache.v1beta2.json @@ -0,0 +1,1552 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.memcache.v1beta2", + "version": "v1beta2" + } + ], + "language": "PYTHON", + "name": "google-cloud-memcache", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.apply_parameters", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.ApplyParameters", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ApplyParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.ApplyParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "node_ids", + "type": "MutableSequence[str]" + }, + { + "name": "apply_all", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "apply_parameters" + }, + "description": "Sample for ApplyParameters", + "file": "memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_ApplyParameters_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": "memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.apply_parameters", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.ApplyParameters", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ApplyParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.ApplyParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "node_ids", + "type": "MutableSequence[str]" + }, + { + "name": "apply_all", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "apply_parameters" + }, + "description": "Sample for ApplyParameters", + "file": "memcache_v1beta2_generated_cloud_memcache_apply_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_ApplyParameters_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": "memcache_v1beta2_generated_cloud_memcache_apply_parameters_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.apply_software_update", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.ApplySoftwareUpdate", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ApplySoftwareUpdate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.ApplySoftwareUpdateRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "node_ids", + "type": "MutableSequence[str]" + }, + { + "name": "apply_all", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "apply_software_update" + }, + "description": "Sample for ApplySoftwareUpdate", + "file": "memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_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": "memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.apply_software_update", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.ApplySoftwareUpdate", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ApplySoftwareUpdate" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.ApplySoftwareUpdateRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "node_ids", + "type": "MutableSequence[str]" + }, + { + "name": "apply_all", + "type": "bool" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "apply_software_update" + }, + "description": "Sample for ApplySoftwareUpdate", + "file": "memcache_v1beta2_generated_cloud_memcache_apply_software_update_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_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": "memcache_v1beta2_generated_cloud_memcache_apply_software_update_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.create_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.CreateInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "resource", + "type": "google.cloud.memcache_v1beta2.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "memcache_v1beta2_generated_cloud_memcache_create_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_CreateInstance_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": "memcache_v1beta2_generated_cloud_memcache_create_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.create_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.CreateInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "CreateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.CreateInstanceRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "instance_id", + "type": "str" + }, + { + "name": "resource", + "type": "google.cloud.memcache_v1beta2.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_instance" + }, + "description": "Sample for CreateInstance", + "file": "memcache_v1beta2_generated_cloud_memcache_create_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_CreateInstance_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": "memcache_v1beta2_generated_cloud_memcache_create_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.delete_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.DeleteInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.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": "memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_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": "memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.delete_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.DeleteInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "DeleteInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.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": "memcache_v1beta2_generated_cloud_memcache_delete_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_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": "memcache_v1beta2_generated_cloud_memcache_delete_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.get_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.GetInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.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.memcache_v1beta2.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "memcache_v1beta2_generated_cloud_memcache_get_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_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": "memcache_v1beta2_generated_cloud_memcache_get_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.get_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.GetInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "GetInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.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.memcache_v1beta2.types.Instance", + "shortName": "get_instance" + }, + "description": "Sample for GetInstance", + "file": "memcache_v1beta2_generated_cloud_memcache_get_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_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": "memcache_v1beta2_generated_cloud_memcache_get_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.list_instances", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.ListInstances", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.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.memcache_v1beta2.services.cloud_memcache.pagers.ListInstancesAsyncPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "memcache_v1beta2_generated_cloud_memcache_list_instances_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_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": "memcache_v1beta2_generated_cloud_memcache_list_instances_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.list_instances", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.ListInstances", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "ListInstances" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.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.memcache_v1beta2.services.cloud_memcache.pagers.ListInstancesPager", + "shortName": "list_instances" + }, + "description": "Sample for ListInstances", + "file": "memcache_v1beta2_generated_cloud_memcache_list_instances_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_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": "memcache_v1beta2_generated_cloud_memcache_list_instances_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.RescheduleMaintenanceRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.memcache_v1beta2.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_RescheduleMaintenance_async", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.reschedule_maintenance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.RescheduleMaintenance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "RescheduleMaintenance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.RescheduleMaintenanceRequest" + }, + { + "name": "instance", + "type": "str" + }, + { + "name": "reschedule_type", + "type": "google.cloud.memcache_v1beta2.types.RescheduleMaintenanceRequest.RescheduleType" + }, + { + "name": "schedule_time", + "type": "google.protobuf.timestamp_pb2.Timestamp" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "reschedule_maintenance" + }, + "description": "Sample for RescheduleMaintenance", + "file": "memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_RescheduleMaintenance_sync", + "segments": [ + { + "end": 56, + "start": 27, + "type": "FULL" + }, + { + "end": 56, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 53, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 57, + "start": 54, + "type": "RESPONSE_HANDLING" + } + ], + "title": "memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.update_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.UpdateInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.UpdateInstanceRequest" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "resource", + "type": "google.cloud.memcache_v1beta2.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "memcache_v1beta2_generated_cloud_memcache_update_instance_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_UpdateInstance_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": "memcache_v1beta2_generated_cloud_memcache_update_instance_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.update_instance", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.UpdateInstance", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateInstance" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.UpdateInstanceRequest" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "resource", + "type": "google.cloud.memcache_v1beta2.types.Instance" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_instance" + }, + "description": "Sample for UpdateInstance", + "file": "memcache_v1beta2_generated_cloud_memcache_update_instance_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_UpdateInstance_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": "memcache_v1beta2_generated_cloud_memcache_update_instance_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient", + "shortName": "CloudMemcacheAsyncClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheAsyncClient.update_parameters", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.UpdateParameters", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.UpdateParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "parameters", + "type": "google.cloud.memcache_v1beta2.types.MemcacheParameters" + }, + { + "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_parameters" + }, + "description": "Sample for UpdateParameters", + "file": "memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_UpdateParameters_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": "memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient", + "shortName": "CloudMemcacheClient" + }, + "fullName": "google.cloud.memcache_v1beta2.CloudMemcacheClient.update_parameters", + "method": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache.UpdateParameters", + "service": { + "fullName": "google.cloud.memcache.v1beta2.CloudMemcache", + "shortName": "CloudMemcache" + }, + "shortName": "UpdateParameters" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.memcache_v1beta2.types.UpdateParametersRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "parameters", + "type": "google.cloud.memcache_v1beta2.types.MemcacheParameters" + }, + { + "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_parameters" + }, + "description": "Sample for UpdateParameters", + "file": "memcache_v1beta2_generated_cloud_memcache_update_parameters_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "memcache_v1beta2_generated_CloudMemcache_UpdateParameters_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": "memcache_v1beta2_generated_cloud_memcache_update_parameters_sync.py" + } + ] +} diff --git a/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1/test_cloud_memcache.py b/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1/test_cloud_memcache.py index 65c1125a0afd..bcf2b8670776 100644 --- a/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1/test_cloud_memcache.py +++ b/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1/test_cloud_memcache.py @@ -1135,9 +1135,11 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_instances(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1beta2/test_cloud_memcache.py b/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1beta2/test_cloud_memcache.py index 27b0a13fc4f7..e37e032e337a 100644 --- a/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1beta2/test_cloud_memcache.py +++ b/packages/google-cloud-memcache/tests/unit/gapic/memcache_v1beta2/test_cloud_memcache.py @@ -1135,9 +1135,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