From a0766093a345b26fea805f3e0d06a9c5ed4b2b99 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Nov 2021 15:24:18 -0500 Subject: [PATCH 01/14] chore: use gapic-generator-python 0.56.2 (#137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: https://github.com/googleapis/googleapis/commit/2921f9fb3bfbd16f6b2da0104373e2b47a80a65e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/lookup_service/async_client.py | 13 +- .../services/lookup_service/client.py | 25 ++- .../lookup_service/transports/base.py | 8 +- .../lookup_service/transports/grpc.py | 4 +- .../lookup_service/transports/grpc_asyncio.py | 4 +- .../registration_service/async_client.py | 13 +- .../services/registration_service/client.py | 25 ++- .../registration_service/transports/base.py | 8 +- .../registration_service/transports/grpc.py | 4 +- .../transports/grpc_asyncio.py | 4 +- .../services/lookup_service/async_client.py | 13 +- .../services/lookup_service/client.py | 25 ++- .../lookup_service/transports/base.py | 8 +- .../lookup_service/transports/grpc.py | 4 +- .../lookup_service/transports/grpc_asyncio.py | 4 +- .../registration_service/async_client.py | 13 +- .../services/registration_service/client.py | 25 ++- .../registration_service/transports/base.py | 8 +- .../registration_service/transports/grpc.py | 4 +- .../transports/grpc_asyncio.py | 4 +- .../test_registration_service.py | 192 +++++++++++++----- .../test_registration_service.py | 192 +++++++++++++----- 22 files changed, 420 insertions(+), 180 deletions(-) diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py index 42d05979..51a48b33 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py @@ -19,14 +19,17 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core.client_options import ClientOptions # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core.client_options import ClientOptions +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1.types import lookup_service from google.cloud.servicedirectory_v1.types import service diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1/services/lookup_service/client.py index f202b92f..b5826c31 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/client.py @@ -14,23 +14,25 @@ # limitations under the License. # from collections import OrderedDict -from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core import client_options as client_options_lib # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1.types import lookup_service from google.cloud.servicedirectory_v1.types import service @@ -303,8 +305,15 @@ def __init__( client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. - use_client_cert = bool( - util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) + if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( + "true", + "false", + ): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + use_client_cert = ( + os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" ) client_cert_source_func = None diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py index 30bd7183..d7936941 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py @@ -18,10 +18,10 @@ import pkg_resources import google.auth # type: ignore -import google.api_core # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py index 93eee38f..c8178ab4 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py @@ -16,8 +16,8 @@ import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import grpc_helpers # type: ignore -from google.api_core import gapic_v1 # type: ignore +from google.api_core import grpc_helpers +from google.api_core import gapic_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py index a23f4b24..dafe43dd 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py @@ -16,8 +16,8 @@ import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import gapic_v1 # type: ignore -from google.api_core import grpc_helpers_async # type: ignore +from google.api_core import gapic_v1 +from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py index 7be6fc14..c59328e5 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py @@ -19,14 +19,17 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core.client_options import ClientOptions # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core.client_options import ClientOptions +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1.services.registration_service import pagers from google.cloud.servicedirectory_v1.types import endpoint diff --git a/google/cloud/servicedirectory_v1/services/registration_service/client.py b/google/cloud/servicedirectory_v1/services/registration_service/client.py index 726551d2..7b3de0f0 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/client.py @@ -14,23 +14,25 @@ # limitations under the License. # from collections import OrderedDict -from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core import client_options as client_options_lib # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1.services.registration_service import pagers from google.cloud.servicedirectory_v1.types import endpoint @@ -347,8 +349,15 @@ def __init__( client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. - use_client_cert = bool( - util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) + if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( + "true", + "false", + ): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + use_client_cert = ( + os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" ) client_cert_source_func = None diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py index 2d4ca573..f6fc37d0 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py @@ -18,10 +18,10 @@ import pkg_resources import google.auth # type: ignore -import google.api_core # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py index 295d391c..6de1f18e 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py @@ -16,8 +16,8 @@ import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import grpc_helpers # type: ignore -from google.api_core import gapic_v1 # type: ignore +from google.api_core import grpc_helpers +from google.api_core import gapic_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py index 4b9ee2c4..a110b247 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py @@ -16,8 +16,8 @@ import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import gapic_v1 # type: ignore -from google.api_core import grpc_helpers_async # type: ignore +from google.api_core import gapic_v1 +from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py index 032aed17..02fc2847 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py @@ -19,14 +19,17 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core.client_options import ClientOptions # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core.client_options import ClientOptions +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1beta1.types import lookup_service from google.cloud.servicedirectory_v1beta1.types import service diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py index 54acaeb4..9b57d6bd 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py @@ -14,23 +14,25 @@ # limitations under the License. # from collections import OrderedDict -from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core import client_options as client_options_lib # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1beta1.types import lookup_service from google.cloud.servicedirectory_v1beta1.types import service @@ -319,8 +321,15 @@ def __init__( client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. - use_client_cert = bool( - util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) + if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( + "true", + "false", + ): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + use_client_cert = ( + os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" ) client_cert_source_func = None diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py index bffbd8f3..10d9aa3f 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py @@ -18,10 +18,10 @@ import pkg_resources import google.auth # type: ignore -import google.api_core # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py index 1a4faf02..6965a866 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py @@ -16,8 +16,8 @@ import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import grpc_helpers # type: ignore -from google.api_core import gapic_v1 # type: ignore +from google.api_core import grpc_helpers +from google.api_core import gapic_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py index bb95e225..94edfdb3 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py @@ -16,8 +16,8 @@ import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import gapic_v1 # type: ignore -from google.api_core import grpc_helpers_async # type: ignore +from google.api_core import gapic_v1 +from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py index dd1f8581..06a571e5 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py @@ -19,14 +19,17 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core.client_options import ClientOptions # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core.client_options import ClientOptions +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1beta1.services.registration_service import pagers from google.cloud.servicedirectory_v1beta1.types import endpoint diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py index a2cf6010..ffe1e482 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py @@ -14,23 +14,25 @@ # limitations under the License. # from collections import OrderedDict -from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources -from google.api_core import client_options as client_options_lib # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +from google.api_core import client_options as client_options_lib +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore -OptionalRetry = Union[retries.Retry, object] +try: + OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] +except AttributeError: # pragma: NO COVER + OptionalRetry = Union[retries.Retry, object] # type: ignore from google.cloud.servicedirectory_v1beta1.services.registration_service import pagers from google.cloud.servicedirectory_v1beta1.types import endpoint @@ -365,8 +367,15 @@ def __init__( client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. - use_client_cert = bool( - util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) + if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( + "true", + "false", + ): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + use_client_cert = ( + os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" ) client_cert_source_func = None diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py index 88ed88f0..a7dbee07 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py @@ -18,10 +18,10 @@ import pkg_resources import google.auth # type: ignore -import google.api_core # type: ignore -from google.api_core import exceptions as core_exceptions # type: ignore -from google.api_core import gapic_v1 # type: ignore -from google.api_core import retry as retries # type: ignore +import google.api_core +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py index c854bfde..353ee64d 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py @@ -16,8 +16,8 @@ import warnings from typing import Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import grpc_helpers # type: ignore -from google.api_core import gapic_v1 # type: ignore +from google.api_core import grpc_helpers +from google.api_core import gapic_v1 import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py index 20287210..304b3f95 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py @@ -16,8 +16,8 @@ import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union -from google.api_core import gapic_v1 # type: ignore -from google.api_core import grpc_helpers_async # type: ignore +from google.api_core import gapic_v1 +from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore diff --git a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py index eaa9ce97..320db48b 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py @@ -673,9 +673,15 @@ def test_create_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].namespace_id == "namespace_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].namespace_id + mock_val = "namespace_id_value" + assert arg == mock_val def test_create_namespace_flattened_error(): @@ -720,9 +726,15 @@ async def test_create_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].namespace_id == "namespace_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].namespace_id + mock_val = "namespace_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -900,7 +912,9 @@ def test_list_namespaces_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_namespaces_flattened_error(): @@ -938,7 +952,9 @@ async def test_list_namespaces_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1257,7 +1273,9 @@ def test_get_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_namespace_flattened_error(): @@ -1293,7 +1311,9 @@ async def test_get_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1471,8 +1491,12 @@ def test_update_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val def test_update_namespace_flattened_error(): @@ -1515,8 +1539,12 @@ async def test_update_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val @pytest.mark.asyncio @@ -1683,7 +1711,9 @@ def test_delete_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_namespace_flattened_error(): @@ -1719,7 +1749,9 @@ async def test_delete_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1892,9 +1924,15 @@ def test_create_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].service_id == "service_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].service_id + mock_val = "service_id_value" + assert arg == mock_val def test_create_service_flattened_error(): @@ -1937,9 +1975,15 @@ async def test_create_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].service_id == "service_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].service_id + mock_val = "service_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2117,7 +2161,9 @@ def test_list_services_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_services_flattened_error(): @@ -2155,7 +2201,9 @@ async def test_list_services_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2457,7 +2505,9 @@ def test_get_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_service_flattened_error(): @@ -2493,7 +2543,9 @@ async def test_get_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2669,8 +2721,12 @@ def test_update_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val def test_update_service_flattened_error(): @@ -2711,8 +2767,12 @@ async def test_update_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val @pytest.mark.asyncio @@ -2879,7 +2939,9 @@ def test_delete_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_service_flattened_error(): @@ -2915,7 +2977,9 @@ async def test_delete_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3096,9 +3160,15 @@ def test_create_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].endpoint_id == "endpoint_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].endpoint_id + mock_val = "endpoint_id_value" + assert arg == mock_val def test_create_endpoint_flattened_error(): @@ -3143,9 +3213,15 @@ async def test_create_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].endpoint_id == "endpoint_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].endpoint_id + mock_val = "endpoint_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3323,7 +3399,9 @@ def test_list_endpoints_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_endpoints_flattened_error(): @@ -3361,7 +3439,9 @@ async def test_list_endpoints_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3686,7 +3766,9 @@ def test_get_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_endpoint_flattened_error(): @@ -3722,7 +3804,9 @@ async def test_get_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3906,8 +3990,12 @@ def test_update_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val def test_update_endpoint_flattened_error(): @@ -3950,8 +4038,12 @@ async def test_update_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val @pytest.mark.asyncio @@ -4118,7 +4210,9 @@ def test_delete_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_endpoint_flattened_error(): @@ -4154,7 +4248,9 @@ async def test_delete_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py index 673532a5..01baa09c 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py @@ -676,9 +676,15 @@ def test_create_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].namespace_id == "namespace_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].namespace_id + mock_val = "namespace_id_value" + assert arg == mock_val def test_create_namespace_flattened_error(): @@ -723,9 +729,15 @@ async def test_create_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].namespace_id == "namespace_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].namespace_id + mock_val = "namespace_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -903,7 +915,9 @@ def test_list_namespaces_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_namespaces_flattened_error(): @@ -941,7 +955,9 @@ async def test_list_namespaces_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1260,7 +1276,9 @@ def test_get_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_namespace_flattened_error(): @@ -1296,7 +1314,9 @@ async def test_get_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1474,8 +1494,12 @@ def test_update_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val def test_update_namespace_flattened_error(): @@ -1518,8 +1542,12 @@ async def test_update_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].namespace == gcs_namespace.Namespace(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].namespace + mock_val = gcs_namespace.Namespace(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val @pytest.mark.asyncio @@ -1686,7 +1714,9 @@ def test_delete_namespace_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_namespace_flattened_error(): @@ -1722,7 +1752,9 @@ async def test_delete_namespace_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -1895,9 +1927,15 @@ def test_create_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].service_id == "service_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].service_id + mock_val = "service_id_value" + assert arg == mock_val def test_create_service_flattened_error(): @@ -1940,9 +1978,15 @@ async def test_create_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].service_id == "service_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].service_id + mock_val = "service_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2120,7 +2164,9 @@ def test_list_services_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_services_flattened_error(): @@ -2158,7 +2204,9 @@ async def test_list_services_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2460,7 +2508,9 @@ def test_get_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_service_flattened_error(): @@ -2496,7 +2546,9 @@ async def test_get_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -2672,8 +2724,12 @@ def test_update_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val def test_update_service_flattened_error(): @@ -2714,8 +2770,12 @@ async def test_update_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].service == gcs_service.Service(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].service + mock_val = gcs_service.Service(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val @pytest.mark.asyncio @@ -2882,7 +2942,9 @@ def test_delete_service_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_service_flattened_error(): @@ -2918,7 +2980,9 @@ async def test_delete_service_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3109,9 +3173,15 @@ def test_create_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].endpoint_id == "endpoint_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].endpoint_id + mock_val = "endpoint_id_value" + assert arg == mock_val def test_create_endpoint_flattened_error(): @@ -3156,9 +3226,15 @@ async def test_create_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].endpoint_id == "endpoint_id_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].endpoint_id + mock_val = "endpoint_id_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3336,7 +3412,9 @@ def test_list_endpoints_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val def test_list_endpoints_flattened_error(): @@ -3374,7 +3452,9 @@ async def test_list_endpoints_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].parent == "parent_value" + arg = args[0].parent + mock_val = "parent_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3709,7 +3789,9 @@ def test_get_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_get_endpoint_flattened_error(): @@ -3745,7 +3827,9 @@ async def test_get_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio @@ -3939,8 +4023,12 @@ def test_update_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val def test_update_endpoint_flattened_error(): @@ -3983,8 +4071,12 @@ async def test_update_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].endpoint == gcs_endpoint.Endpoint(name="name_value") - assert args[0].update_mask == field_mask_pb2.FieldMask(paths=["paths_value"]) + arg = args[0].endpoint + mock_val = gcs_endpoint.Endpoint(name="name_value") + assert arg == mock_val + arg = args[0].update_mask + mock_val = field_mask_pb2.FieldMask(paths=["paths_value"]) + assert arg == mock_val @pytest.mark.asyncio @@ -4151,7 +4243,9 @@ def test_delete_endpoint_flattened(): # request object values. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val def test_delete_endpoint_flattened_error(): @@ -4187,7 +4281,9 @@ async def test_delete_endpoint_flattened_async(): # request object values. assert len(call.mock_calls) _, args, _ = call.mock_calls[0] - assert args[0].name == "name_value" + arg = args[0].name + mock_val = "name_value" + assert arg == mock_val @pytest.mark.asyncio From 39babd79954d2d9da6331a0bb7d587404fb79d65 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 12:18:46 -0500 Subject: [PATCH 02/14] chore(python): add .github/CODEOWNERS as a templated file (#138) Source-Link: https://github.com/googleapis/synthtool/commit/c5026b3217973a8db55db8ee85feee0e9a65e295 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/CODEOWNERS | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index cb89b2e3..7519fa3a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:ec49167c606648a063d1222220b48119c912562849a0528f35bfb592a9f72737 + digest: sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30c3973a..44cc8685 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,9 +3,10 @@ # # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax +# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json. -# The @googleapis/yoshi-python is the default owner for changes in this repo -* @googleapis/yoshi-python +# @googleapis/yoshi-python is the default owner for changes in this repo +* @googleapis/yoshi-python -# The python-samples-reviewers team is the default owner for samples changes -/samples/ @googleapis/python-samples-owners \ No newline at end of file +# @googleapis/python-samples-owners is the default owner for samples changes +/samples/ @googleapis/python-samples-owners From 73b8360347f1893d0a218c56636862527f16eb77 Mon Sep 17 00:00:00 2001 From: Dan Lee <71398022+dandhlee@users.noreply.github.com> Date: Wed, 17 Nov 2021 17:12:11 -0500 Subject: [PATCH 03/14] chore: update doc links from googleapis.dev to cloud.google.com (#139) --- .repo-metadata.json | 2 +- README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index f41adc2d..fa1763ac 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -2,7 +2,7 @@ "name": "servicedirectory", "name_pretty": "Service Directory", "product_documentation": "https://cloud.google.com/service-directory/", - "client_documentation": "https://googleapis.dev/python/servicedirectory/latest", + "client_documentation": "https://cloud.google.com/python/docs/reference/servicedirectory/latest", "issue_tracker": "", "release_level": "ga", "language": "python", diff --git a/README.rst b/README.rst index 02902b9e..9e79e530 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ Python Client for Service Directory .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-service-directory.svg :target: https://pypi.org/project/google-cloud-service-directory/ .. _Cloud Service Directory API: https://cloud.google.com/service-directory -.. _Client Library Documentation: https://googleapis.dev/python/servicedirectory/latest/ +.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/servicedirectory/latest/ .. _Product Documentation: https://cloud.google.com/service-directory Quick Start From 554d934fc01ee0cd28122d8ddfb1b79cb7b02c88 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Tue, 28 Dec 2021 13:14:08 -0500 Subject: [PATCH 04/14] chore: update .repo-metadata.json (#142) --- .repo-metadata.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index fa1763ac..78577d2d 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -4,12 +4,13 @@ "product_documentation": "https://cloud.google.com/service-directory/", "client_documentation": "https://cloud.google.com/python/docs/reference/servicedirectory/latest", "issue_tracker": "", - "release_level": "ga", + "release_level": "stable", "language": "python", "library_type": "GAPIC_AUTO", "repo": "googleapis/python-service-directory", "distribution_name": "google-cloud-service-directory", "api_id": "servicedirectory.googleapis.com", "default_version": "v1", - "codeowner_team": "" + "codeowner_team": "", + "api_shortname": "servicedirectory" } From 9bdf4d6a0aba868dd2a62662d12aa737e1003f40 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 6 Jan 2022 17:14:29 +0000 Subject: [PATCH 05/14] chore: use python-samples-reviewers (#144) --- .github/.OwlBot.lock.yaml | 2 +- .github/CODEOWNERS | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 7519fa3a..f33299dd 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:0e18b9475fbeb12d9ad4302283171edebb6baf2dfca1bd215ee3b34ed79d95d7 + digest: sha256:899d5d7cc340fa8ef9d8ae1a8cfba362c6898584f779e156f25ee828ba824610 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 44cc8685..e446644f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,5 +8,5 @@ # @googleapis/yoshi-python is the default owner for changes in this repo * @googleapis/yoshi-python -# @googleapis/python-samples-owners is the default owner for samples changes -/samples/ @googleapis/python-samples-owners +# @googleapis/python-samples-reviewers is the default owner for samples changes +/samples/ @googleapis/python-samples-reviewers From 7fd6b163012e42b499a2d7ffa75be85a0bbffddf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 8 Jan 2022 06:16:20 -0500 Subject: [PATCH 06/14] chore: use gapic-generator-python 0.58.4 (#143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.58.4 fix: provide appropriate mock values for message body fields committer: dovs PiperOrigin-RevId: 419025932 Source-Link: https://github.com/googleapis/googleapis/commit/73da6697f598f1ba30618924936a59f8e457ec89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/46df624a54b9ed47c1a7eefb7a49413cf7b82f98 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDZkZjYyNGE1NGI5ZWQ0N2MxYTdlZWZiN2E0OTQxM2NmN2I4MmY5OCJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../lookup_service/transports/base.py | 1 - .../registration_service/transports/base.py | 1 - .../lookup_service/transports/base.py | 1 - .../registration_service/transports/base.py | 1 - .../test_lookup_service.py | 23 +- .../test_registration_service.py | 244 +++++++----------- .../test_lookup_service.py | 23 +- .../test_registration_service.py | 244 +++++++----------- 8 files changed, 216 insertions(+), 322 deletions(-) diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py index d7936941..317e7cfb 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py @@ -101,7 +101,6 @@ def __init__( credentials, _ = google.auth.load_credentials_from_file( credentials_file, **scopes_kwargs, quota_project_id=quota_project_id ) - elif credentials is None: credentials, _ = google.auth.default( **scopes_kwargs, quota_project_id=quota_project_id diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py index f6fc37d0..86f40a47 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py @@ -110,7 +110,6 @@ def __init__( credentials, _ = google.auth.load_credentials_from_file( credentials_file, **scopes_kwargs, quota_project_id=quota_project_id ) - elif credentials is None: credentials, _ = google.auth.default( **scopes_kwargs, quota_project_id=quota_project_id diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py index 10d9aa3f..1b7478cb 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py @@ -101,7 +101,6 @@ def __init__( credentials, _ = google.auth.load_credentials_from_file( credentials_file, **scopes_kwargs, quota_project_id=quota_project_id ) - elif credentials is None: credentials, _ = google.auth.default( **scopes_kwargs, quota_project_id=quota_project_id diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py index a7dbee07..63779139 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py @@ -110,7 +110,6 @@ def __init__( credentials, _ = google.auth.load_credentials_from_file( credentials_file, **scopes_kwargs, quota_project_id=quota_project_id ) - elif credentials is None: credentials, _ = google.auth.default( **scopes_kwargs, quota_project_id=quota_project_id diff --git a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py index 644fc290..7d88cc10 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py @@ -248,20 +248,20 @@ def test_lookup_service_client_client_options( # unsupported value. with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): with pytest.raises(MutualTLSChannelError): - client = client_class() + client = client_class(transport=transport_name) # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. with mock.patch.dict( os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} ): with pytest.raises(ValueError): - client = client_class() + client = client_class(transport=transport_name) # Check the case quota_project_id is provided options = client_options.ClientOptions(quota_project_id="octopus") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -320,7 +320,7 @@ def test_lookup_service_client_mtls_env_auto( ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) if use_client_cert_env == "false": expected_client_cert_source = None @@ -415,7 +415,7 @@ def test_lookup_service_client_client_options_scopes( options = client_options.ClientOptions(scopes=["1", "2"],) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -446,7 +446,7 @@ def test_lookup_service_client_client_options_credentials_file( options = client_options.ClientOptions(credentials_file="credentials.json") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file="credentials.json", @@ -479,9 +479,8 @@ def test_lookup_service_client_client_options_from_dict(): ) -def test_resolve_service( - transport: str = "grpc", request_type=lookup_service.ResolveServiceRequest -): +@pytest.mark.parametrize("request_type", [lookup_service.ResolveServiceRequest, dict,]) +def test_resolve_service(request_type, transport: str = "grpc"): client = LookupServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -505,10 +504,6 @@ def test_resolve_service( assert isinstance(response, lookup_service.ResolveServiceResponse) -def test_resolve_service_from_dict(): - test_resolve_service(request_type=dict) - - def test_resolve_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1157,7 +1152,7 @@ def test_parse_common_location_path(): assert expected == actual -def test_client_withDEFAULT_CLIENT_INFO(): +def test_client_with_default_client_info(): client_info = gapic_v1.client_info.ClientInfo() with mock.patch.object( diff --git a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py index 320db48b..a7ceb143 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py @@ -266,20 +266,20 @@ def test_registration_service_client_client_options( # unsupported value. with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): with pytest.raises(MutualTLSChannelError): - client = client_class() + client = client_class(transport=transport_name) # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. with mock.patch.dict( os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} ): with pytest.raises(ValueError): - client = client_class() + client = client_class(transport=transport_name) # Check the case quota_project_id is provided options = client_options.ClientOptions(quota_project_id="octopus") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -348,7 +348,7 @@ def test_registration_service_client_mtls_env_auto( ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) if use_client_cert_env == "false": expected_client_cert_source = None @@ -447,7 +447,7 @@ def test_registration_service_client_client_options_scopes( options = client_options.ClientOptions(scopes=["1", "2"],) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -482,7 +482,7 @@ def test_registration_service_client_client_options_credentials_file( options = client_options.ClientOptions(credentials_file="credentials.json") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file="credentials.json", @@ -515,9 +515,10 @@ def test_registration_service_client_client_options_from_dict(): ) -def test_create_namespace( - transport: str = "grpc", request_type=registration_service.CreateNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.CreateNamespaceRequest, dict,] +) +def test_create_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -542,10 +543,6 @@ def test_create_namespace( assert response.name == "name_value" -def test_create_namespace_from_dict(): - test_create_namespace(request_type=dict) - - def test_create_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -754,9 +751,10 @@ async def test_create_namespace_flattened_error_async(): ) -def test_list_namespaces( - transport: str = "grpc", request_type=registration_service.ListNamespacesRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.ListNamespacesRequest, dict,] +) +def test_list_namespaces(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -783,10 +781,6 @@ def test_list_namespaces( assert response.next_page_token == "next_page_token_value" -def test_list_namespaces_from_dict(): - test_list_namespaces(request_type=dict) - - def test_list_namespaces_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -971,8 +965,10 @@ async def test_list_namespaces_flattened_error_async(): ) -def test_list_namespaces_pager(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_namespaces_pager(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_namespaces), "__call__") as call: @@ -1011,8 +1007,10 @@ def test_list_namespaces_pager(): assert all(isinstance(i, namespace.Namespace) for i in results) -def test_list_namespaces_pages(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_namespaces_pages(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_namespaces), "__call__") as call: @@ -1121,9 +1119,10 @@ async def test_list_namespaces_async_pages(): assert page_.raw_page.next_page_token == token -def test_get_namespace( - transport: str = "grpc", request_type=registration_service.GetNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.GetNamespaceRequest, dict,] +) +def test_get_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1148,10 +1147,6 @@ def test_get_namespace( assert response.name == "name_value" -def test_get_namespace_from_dict(): - test_get_namespace(request_type=dict) - - def test_get_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1330,9 +1325,10 @@ async def test_get_namespace_flattened_error_async(): ) -def test_update_namespace( - transport: str = "grpc", request_type=registration_service.UpdateNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.UpdateNamespaceRequest, dict,] +) +def test_update_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1357,10 +1353,6 @@ def test_update_namespace( assert response.name == "name_value" -def test_update_namespace_from_dict(): - test_update_namespace(request_type=dict) - - def test_update_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1563,9 +1555,10 @@ async def test_update_namespace_flattened_error_async(): ) -def test_delete_namespace( - transport: str = "grpc", request_type=registration_service.DeleteNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.DeleteNamespaceRequest, dict,] +) +def test_delete_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1589,10 +1582,6 @@ def test_delete_namespace( assert response is None -def test_delete_namespace_from_dict(): - test_delete_namespace(request_type=dict) - - def test_delete_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1768,9 +1757,10 @@ async def test_delete_namespace_flattened_error_async(): ) -def test_create_service( - transport: str = "grpc", request_type=registration_service.CreateServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.CreateServiceRequest, dict,] +) +def test_create_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1795,10 +1785,6 @@ def test_create_service( assert response.name == "name_value" -def test_create_service_from_dict(): - test_create_service(request_type=dict) - - def test_create_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2003,9 +1989,10 @@ async def test_create_service_flattened_error_async(): ) -def test_list_services( - transport: str = "grpc", request_type=registration_service.ListServicesRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.ListServicesRequest, dict,] +) +def test_list_services(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2032,10 +2019,6 @@ def test_list_services( assert response.next_page_token == "next_page_token_value" -def test_list_services_from_dict(): - test_list_services(request_type=dict) - - def test_list_services_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2220,8 +2203,10 @@ async def test_list_services_flattened_error_async(): ) -def test_list_services_pager(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_services_pager(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_services), "__call__") as call: @@ -2256,8 +2241,10 @@ def test_list_services_pager(): assert all(isinstance(i, service.Service) for i in results) -def test_list_services_pages(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_services_pages(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_services), "__call__") as call: @@ -2354,9 +2341,10 @@ async def test_list_services_async_pages(): assert page_.raw_page.next_page_token == token -def test_get_service( - transport: str = "grpc", request_type=registration_service.GetServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.GetServiceRequest, dict,] +) +def test_get_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2381,10 +2369,6 @@ def test_get_service( assert response.name == "name_value" -def test_get_service_from_dict(): - test_get_service(request_type=dict) - - def test_get_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2562,9 +2546,10 @@ async def test_get_service_flattened_error_async(): ) -def test_update_service( - transport: str = "grpc", request_type=registration_service.UpdateServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.UpdateServiceRequest, dict,] +) +def test_update_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2589,10 +2574,6 @@ def test_update_service( assert response.name == "name_value" -def test_update_service_from_dict(): - test_update_service(request_type=dict) - - def test_update_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2791,9 +2772,10 @@ async def test_update_service_flattened_error_async(): ) -def test_delete_service( - transport: str = "grpc", request_type=registration_service.DeleteServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.DeleteServiceRequest, dict,] +) +def test_delete_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2817,10 +2799,6 @@ def test_delete_service( assert response is None -def test_delete_service_from_dict(): - test_delete_service(request_type=dict) - - def test_delete_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2996,9 +2974,10 @@ async def test_delete_service_flattened_error_async(): ) -def test_create_endpoint( - transport: str = "grpc", request_type=registration_service.CreateEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.CreateEndpointRequest, dict,] +) +def test_create_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3027,10 +3006,6 @@ def test_create_endpoint( assert response.port == 453 -def test_create_endpoint_from_dict(): - test_create_endpoint(request_type=dict) - - def test_create_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3241,9 +3216,10 @@ async def test_create_endpoint_flattened_error_async(): ) -def test_list_endpoints( - transport: str = "grpc", request_type=registration_service.ListEndpointsRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.ListEndpointsRequest, dict,] +) +def test_list_endpoints(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3270,10 +3246,6 @@ def test_list_endpoints( assert response.next_page_token == "next_page_token_value" -def test_list_endpoints_from_dict(): - test_list_endpoints(request_type=dict) - - def test_list_endpoints_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3458,8 +3430,10 @@ async def test_list_endpoints_flattened_error_async(): ) -def test_list_endpoints_pager(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_endpoints_pager(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_endpoints), "__call__") as call: @@ -3498,8 +3472,10 @@ def test_list_endpoints_pager(): assert all(isinstance(i, endpoint.Endpoint) for i in results) -def test_list_endpoints_pages(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_endpoints_pages(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_endpoints), "__call__") as call: @@ -3608,9 +3584,10 @@ async def test_list_endpoints_async_pages(): assert page_.raw_page.next_page_token == token -def test_get_endpoint( - transport: str = "grpc", request_type=registration_service.GetEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.GetEndpointRequest, dict,] +) +def test_get_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3639,10 +3616,6 @@ def test_get_endpoint( assert response.port == 453 -def test_get_endpoint_from_dict(): - test_get_endpoint(request_type=dict) - - def test_get_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3823,9 +3796,10 @@ async def test_get_endpoint_flattened_error_async(): ) -def test_update_endpoint( - transport: str = "grpc", request_type=registration_service.UpdateEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.UpdateEndpointRequest, dict,] +) +def test_update_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3854,10 +3828,6 @@ def test_update_endpoint( assert response.port == 453 -def test_update_endpoint_from_dict(): - test_update_endpoint(request_type=dict) - - def test_update_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4062,9 +4032,10 @@ async def test_update_endpoint_flattened_error_async(): ) -def test_delete_endpoint( - transport: str = "grpc", request_type=registration_service.DeleteEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.DeleteEndpointRequest, dict,] +) +def test_delete_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4088,10 +4059,6 @@ def test_delete_endpoint( assert response is None -def test_delete_endpoint_from_dict(): - test_delete_endpoint(request_type=dict) - - def test_delete_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4267,9 +4234,8 @@ async def test_delete_endpoint_flattened_error_async(): ) -def test_get_iam_policy( - transport: str = "grpc", request_type=iam_policy_pb2.GetIamPolicyRequest -): +@pytest.mark.parametrize("request_type", [iam_policy_pb2.GetIamPolicyRequest, dict,]) +def test_get_iam_policy(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4295,10 +4261,6 @@ def test_get_iam_policy( assert response.etag == b"etag_blob" -def test_get_iam_policy_from_dict(): - test_get_iam_policy(request_type=dict) - - def test_get_iam_policy_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4420,9 +4382,8 @@ def test_get_iam_policy_from_dict_foreign(): call.assert_called() -def test_set_iam_policy( - transport: str = "grpc", request_type=iam_policy_pb2.SetIamPolicyRequest -): +@pytest.mark.parametrize("request_type", [iam_policy_pb2.SetIamPolicyRequest, dict,]) +def test_set_iam_policy(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4448,10 +4409,6 @@ def test_set_iam_policy( assert response.etag == b"etag_blob" -def test_set_iam_policy_from_dict(): - test_set_iam_policy(request_type=dict) - - def test_set_iam_policy_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4573,9 +4530,10 @@ def test_set_iam_policy_from_dict_foreign(): call.assert_called() -def test_test_iam_permissions( - transport: str = "grpc", request_type=iam_policy_pb2.TestIamPermissionsRequest -): +@pytest.mark.parametrize( + "request_type", [iam_policy_pb2.TestIamPermissionsRequest, dict,] +) +def test_test_iam_permissions(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4604,10 +4562,6 @@ def test_test_iam_permissions( assert response.permissions == ["permissions_value"] -def test_test_iam_permissions_from_dict(): - test_test_iam_permissions(request_type=dict) - - def test_test_iam_permissions_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -5340,7 +5294,7 @@ def test_parse_common_location_path(): assert expected == actual -def test_client_withDEFAULT_CLIENT_INFO(): +def test_client_with_default_client_info(): client_info = gapic_v1.client_info.ClientInfo() with mock.patch.object( diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py index 63a706ee..d375722d 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py @@ -250,20 +250,20 @@ def test_lookup_service_client_client_options( # unsupported value. with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): with pytest.raises(MutualTLSChannelError): - client = client_class() + client = client_class(transport=transport_name) # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. with mock.patch.dict( os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} ): with pytest.raises(ValueError): - client = client_class() + client = client_class(transport=transport_name) # Check the case quota_project_id is provided options = client_options.ClientOptions(quota_project_id="octopus") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -322,7 +322,7 @@ def test_lookup_service_client_mtls_env_auto( ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) if use_client_cert_env == "false": expected_client_cert_source = None @@ -417,7 +417,7 @@ def test_lookup_service_client_client_options_scopes( options = client_options.ClientOptions(scopes=["1", "2"],) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -448,7 +448,7 @@ def test_lookup_service_client_client_options_credentials_file( options = client_options.ClientOptions(credentials_file="credentials.json") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file="credentials.json", @@ -481,9 +481,8 @@ def test_lookup_service_client_client_options_from_dict(): ) -def test_resolve_service( - transport: str = "grpc", request_type=lookup_service.ResolveServiceRequest -): +@pytest.mark.parametrize("request_type", [lookup_service.ResolveServiceRequest, dict,]) +def test_resolve_service(request_type, transport: str = "grpc"): client = LookupServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -507,10 +506,6 @@ def test_resolve_service( assert isinstance(response, lookup_service.ResolveServiceResponse) -def test_resolve_service_from_dict(): - test_resolve_service(request_type=dict) - - def test_resolve_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1181,7 +1176,7 @@ def test_parse_common_location_path(): assert expected == actual -def test_client_withDEFAULT_CLIENT_INFO(): +def test_client_with_default_client_info(): client_info = gapic_v1.client_info.ClientInfo() with mock.patch.object( diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py index 01baa09c..6ca0bce5 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py @@ -269,20 +269,20 @@ def test_registration_service_client_client_options( # unsupported value. with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "Unsupported"}): with pytest.raises(MutualTLSChannelError): - client = client_class() + client = client_class(transport=transport_name) # Check the case GOOGLE_API_USE_CLIENT_CERTIFICATE has unsupported value. with mock.patch.dict( os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "Unsupported"} ): with pytest.raises(ValueError): - client = client_class() + client = client_class(transport=transport_name) # Check the case quota_project_id is provided options = client_options.ClientOptions(quota_project_id="octopus") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -351,7 +351,7 @@ def test_registration_service_client_mtls_env_auto( ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) if use_client_cert_env == "false": expected_client_cert_source = None @@ -450,7 +450,7 @@ def test_registration_service_client_client_options_scopes( options = client_options.ClientOptions(scopes=["1", "2"],) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -485,7 +485,7 @@ def test_registration_service_client_client_options_credentials_file( options = client_options.ClientOptions(credentials_file="credentials.json") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(transport=transport_name, client_options=options) + client = client_class(client_options=options, transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file="credentials.json", @@ -518,9 +518,10 @@ def test_registration_service_client_client_options_from_dict(): ) -def test_create_namespace( - transport: str = "grpc", request_type=registration_service.CreateNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.CreateNamespaceRequest, dict,] +) +def test_create_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -545,10 +546,6 @@ def test_create_namespace( assert response.name == "name_value" -def test_create_namespace_from_dict(): - test_create_namespace(request_type=dict) - - def test_create_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -757,9 +754,10 @@ async def test_create_namespace_flattened_error_async(): ) -def test_list_namespaces( - transport: str = "grpc", request_type=registration_service.ListNamespacesRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.ListNamespacesRequest, dict,] +) +def test_list_namespaces(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -786,10 +784,6 @@ def test_list_namespaces( assert response.next_page_token == "next_page_token_value" -def test_list_namespaces_from_dict(): - test_list_namespaces(request_type=dict) - - def test_list_namespaces_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -974,8 +968,10 @@ async def test_list_namespaces_flattened_error_async(): ) -def test_list_namespaces_pager(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_namespaces_pager(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_namespaces), "__call__") as call: @@ -1014,8 +1010,10 @@ def test_list_namespaces_pager(): assert all(isinstance(i, namespace.Namespace) for i in results) -def test_list_namespaces_pages(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_namespaces_pages(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_namespaces), "__call__") as call: @@ -1124,9 +1122,10 @@ async def test_list_namespaces_async_pages(): assert page_.raw_page.next_page_token == token -def test_get_namespace( - transport: str = "grpc", request_type=registration_service.GetNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.GetNamespaceRequest, dict,] +) +def test_get_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1151,10 +1150,6 @@ def test_get_namespace( assert response.name == "name_value" -def test_get_namespace_from_dict(): - test_get_namespace(request_type=dict) - - def test_get_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1333,9 +1328,10 @@ async def test_get_namespace_flattened_error_async(): ) -def test_update_namespace( - transport: str = "grpc", request_type=registration_service.UpdateNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.UpdateNamespaceRequest, dict,] +) +def test_update_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1360,10 +1356,6 @@ def test_update_namespace( assert response.name == "name_value" -def test_update_namespace_from_dict(): - test_update_namespace(request_type=dict) - - def test_update_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1566,9 +1558,10 @@ async def test_update_namespace_flattened_error_async(): ) -def test_delete_namespace( - transport: str = "grpc", request_type=registration_service.DeleteNamespaceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.DeleteNamespaceRequest, dict,] +) +def test_delete_namespace(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1592,10 +1585,6 @@ def test_delete_namespace( assert response is None -def test_delete_namespace_from_dict(): - test_delete_namespace(request_type=dict) - - def test_delete_namespace_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -1771,9 +1760,10 @@ async def test_delete_namespace_flattened_error_async(): ) -def test_create_service( - transport: str = "grpc", request_type=registration_service.CreateServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.CreateServiceRequest, dict,] +) +def test_create_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -1798,10 +1788,6 @@ def test_create_service( assert response.name == "name_value" -def test_create_service_from_dict(): - test_create_service(request_type=dict) - - def test_create_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2006,9 +1992,10 @@ async def test_create_service_flattened_error_async(): ) -def test_list_services( - transport: str = "grpc", request_type=registration_service.ListServicesRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.ListServicesRequest, dict,] +) +def test_list_services(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2035,10 +2022,6 @@ def test_list_services( assert response.next_page_token == "next_page_token_value" -def test_list_services_from_dict(): - test_list_services(request_type=dict) - - def test_list_services_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2223,8 +2206,10 @@ async def test_list_services_flattened_error_async(): ) -def test_list_services_pager(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_services_pager(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_services), "__call__") as call: @@ -2259,8 +2244,10 @@ def test_list_services_pager(): assert all(isinstance(i, service.Service) for i in results) -def test_list_services_pages(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_services_pages(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_services), "__call__") as call: @@ -2357,9 +2344,10 @@ async def test_list_services_async_pages(): assert page_.raw_page.next_page_token == token -def test_get_service( - transport: str = "grpc", request_type=registration_service.GetServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.GetServiceRequest, dict,] +) +def test_get_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2384,10 +2372,6 @@ def test_get_service( assert response.name == "name_value" -def test_get_service_from_dict(): - test_get_service(request_type=dict) - - def test_get_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2565,9 +2549,10 @@ async def test_get_service_flattened_error_async(): ) -def test_update_service( - transport: str = "grpc", request_type=registration_service.UpdateServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.UpdateServiceRequest, dict,] +) +def test_update_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2592,10 +2577,6 @@ def test_update_service( assert response.name == "name_value" -def test_update_service_from_dict(): - test_update_service(request_type=dict) - - def test_update_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2794,9 +2775,10 @@ async def test_update_service_flattened_error_async(): ) -def test_delete_service( - transport: str = "grpc", request_type=registration_service.DeleteServiceRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.DeleteServiceRequest, dict,] +) +def test_delete_service(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -2820,10 +2802,6 @@ def test_delete_service( assert response is None -def test_delete_service_from_dict(): - test_delete_service(request_type=dict) - - def test_delete_service_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -2999,9 +2977,10 @@ async def test_delete_service_flattened_error_async(): ) -def test_create_endpoint( - transport: str = "grpc", request_type=registration_service.CreateEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.CreateEndpointRequest, dict,] +) +def test_create_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3034,10 +3013,6 @@ def test_create_endpoint( assert response.network == "network_value" -def test_create_endpoint_from_dict(): - test_create_endpoint(request_type=dict) - - def test_create_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3254,9 +3229,10 @@ async def test_create_endpoint_flattened_error_async(): ) -def test_list_endpoints( - transport: str = "grpc", request_type=registration_service.ListEndpointsRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.ListEndpointsRequest, dict,] +) +def test_list_endpoints(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3283,10 +3259,6 @@ def test_list_endpoints( assert response.next_page_token == "next_page_token_value" -def test_list_endpoints_from_dict(): - test_list_endpoints(request_type=dict) - - def test_list_endpoints_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3471,8 +3443,10 @@ async def test_list_endpoints_flattened_error_async(): ) -def test_list_endpoints_pager(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_endpoints_pager(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_endpoints), "__call__") as call: @@ -3511,8 +3485,10 @@ def test_list_endpoints_pager(): assert all(isinstance(i, endpoint.Endpoint) for i in results) -def test_list_endpoints_pages(): - client = RegistrationServiceClient(credentials=ga_credentials.AnonymousCredentials,) +def test_list_endpoints_pages(transport_name: str = "grpc"): + client = RegistrationServiceClient( + credentials=ga_credentials.AnonymousCredentials, transport=transport_name, + ) # Mock the actual call within the gRPC stub, and fake the request. with mock.patch.object(type(client.transport.list_endpoints), "__call__") as call: @@ -3621,9 +3597,10 @@ async def test_list_endpoints_async_pages(): assert page_.raw_page.next_page_token == token -def test_get_endpoint( - transport: str = "grpc", request_type=registration_service.GetEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.GetEndpointRequest, dict,] +) +def test_get_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3656,10 +3633,6 @@ def test_get_endpoint( assert response.network == "network_value" -def test_get_endpoint_from_dict(): - test_get_endpoint(request_type=dict) - - def test_get_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -3846,9 +3819,10 @@ async def test_get_endpoint_flattened_error_async(): ) -def test_update_endpoint( - transport: str = "grpc", request_type=registration_service.UpdateEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.UpdateEndpointRequest, dict,] +) +def test_update_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -3881,10 +3855,6 @@ def test_update_endpoint( assert response.network == "network_value" -def test_update_endpoint_from_dict(): - test_update_endpoint(request_type=dict) - - def test_update_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4095,9 +4065,10 @@ async def test_update_endpoint_flattened_error_async(): ) -def test_delete_endpoint( - transport: str = "grpc", request_type=registration_service.DeleteEndpointRequest -): +@pytest.mark.parametrize( + "request_type", [registration_service.DeleteEndpointRequest, dict,] +) +def test_delete_endpoint(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4121,10 +4092,6 @@ def test_delete_endpoint( assert response is None -def test_delete_endpoint_from_dict(): - test_delete_endpoint(request_type=dict) - - def test_delete_endpoint_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4300,9 +4267,8 @@ async def test_delete_endpoint_flattened_error_async(): ) -def test_get_iam_policy( - transport: str = "grpc", request_type=iam_policy_pb2.GetIamPolicyRequest -): +@pytest.mark.parametrize("request_type", [iam_policy_pb2.GetIamPolicyRequest, dict,]) +def test_get_iam_policy(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4328,10 +4294,6 @@ def test_get_iam_policy( assert response.etag == b"etag_blob" -def test_get_iam_policy_from_dict(): - test_get_iam_policy(request_type=dict) - - def test_get_iam_policy_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4453,9 +4415,8 @@ def test_get_iam_policy_from_dict_foreign(): call.assert_called() -def test_set_iam_policy( - transport: str = "grpc", request_type=iam_policy_pb2.SetIamPolicyRequest -): +@pytest.mark.parametrize("request_type", [iam_policy_pb2.SetIamPolicyRequest, dict,]) +def test_set_iam_policy(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4481,10 +4442,6 @@ def test_set_iam_policy( assert response.etag == b"etag_blob" -def test_set_iam_policy_from_dict(): - test_set_iam_policy(request_type=dict) - - def test_set_iam_policy_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -4606,9 +4563,10 @@ def test_set_iam_policy_from_dict_foreign(): call.assert_called() -def test_test_iam_permissions( - transport: str = "grpc", request_type=iam_policy_pb2.TestIamPermissionsRequest -): +@pytest.mark.parametrize( + "request_type", [iam_policy_pb2.TestIamPermissionsRequest, dict,] +) +def test_test_iam_permissions(request_type, transport: str = "grpc"): client = RegistrationServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport=transport, ) @@ -4637,10 +4595,6 @@ def test_test_iam_permissions( assert response.permissions == ["permissions_value"] -def test_test_iam_permissions_from_dict(): - test_test_iam_permissions(request_type=dict) - - def test_test_iam_permissions_empty_call(): # This test is a coverage failsafe to make sure that totally empty calls, # i.e. request == None and no flattened fields passed, work. @@ -5395,7 +5349,7 @@ def test_parse_common_location_path(): assert expected == actual -def test_client_withDEFAULT_CLIENT_INFO(): +def test_client_with_default_client_info(): client_info = gapic_v1.client_info.ClientInfo() with mock.patch.object( From 56bc2f30b071624fa392deafc97a4341032588f5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 16:34:13 +0000 Subject: [PATCH 07/14] chore(python): update release.sh to use keystore (#146) build: switch to release-please for tagging --- .github/.OwlBot.lock.yaml | 2 +- .github/release-please.yml | 1 + .github/release-trigger.yml | 1 + .kokoro/release.sh | 2 +- .kokoro/release/common.cfg | 12 +++++++++++- 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .github/release-trigger.yml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f33299dd..eecb84c2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:899d5d7cc340fa8ef9d8ae1a8cfba362c6898584f779e156f25ee828ba824610 + digest: sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3 diff --git a/.github/release-please.yml b/.github/release-please.yml index 4507ad05..466597e5 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1 +1,2 @@ releaseType: python +handleGHRelease: true diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 00000000..d4ca9418 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 11f688c6..6dcdb2ba 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools export PYTHONUNBUFFERED=1 # Move into the package, build the distribution and upload. -TWINE_PASSWORD=$(cat "${KOKORO_GFILE_DIR}/secret_manager/google-cloud-pypi-token") +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1") cd github/python-service-directory python3 setup.py sdist bdist_wheel twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 4e1997bc..4b046927 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,8 +23,18 @@ env_vars: { value: "github/python-service-directory/.kokoro/release.sh" } +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google-cloud-pypi-token-keystore-1" + } + } +} + # Tokens needed to report release status back to GitHub env_vars: { key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,google-cloud-pypi-token" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } From e76451132665a5d6df4c3fb205d98bb287fd400a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 11:08:34 -0500 Subject: [PATCH 08/14] ci(python): run lint / unit tests / docs as GH actions (#147) * ci(python): run lint / unit tests / docs as GH actions Source-Link: https://github.com/googleapis/synthtool/commit/57be0cdb0b94e1669cee0ca38d790de1dfdbcd44 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6 * add commit to trigger gh action Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .github/.OwlBot.lock.yaml | 16 +++++++++- .github/workflows/docs.yml | 38 +++++++++++++++++++++++ .github/workflows/lint.yml | 25 +++++++++++++++ .github/workflows/unittest.yml | 57 ++++++++++++++++++++++++++++++++++ 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/unittest.yml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index eecb84c2..b668c04d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3 + digest: sha256:ed1f9983d5a935a89fe8085e8bb97d94e41015252c5b6c9771257cf8624367e6 + diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..f7b8344c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +on: + pull_request: + branches: + - main +name: docs +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run docs + run: | + nox -s docs + docfx: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run docfx + run: | + nox -s docfx diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..1e8b05c3 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,25 @@ +on: + pull_request: + branches: + - main +name: lint +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run lint + run: | + nox -s lint + - name: Run lint_setup_py + run: | + nox -s lint_setup_py diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 00000000..074ee250 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,57 @@ +on: + pull_request: + branches: + - main +name: unittest +jobs: + unit: + runs-on: ubuntu-latest + strategy: + matrix: + python: ['3.6', '3.7', '3.8', '3.9', '3.10'] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install nox + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install nox + - name: Run unit tests + env: + COVERAGE_FILE: .coverage-${{ matrix.python }} + run: | + nox -s unit-${{ matrix.python }} + - name: Upload coverage results + uses: actions/upload-artifact@v2 + with: + name: coverage-artifacts + path: .coverage-${{ matrix.python }} + + cover: + runs-on: ubuntu-latest + needs: + - unit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install coverage + run: | + python -m pip install --upgrade setuptools pip wheel + python -m pip install coverage + - name: Download coverage results + uses: actions/download-artifact@v2 + with: + name: coverage-artifacts + path: .coverage-results/ + - name: Report coverage results + run: | + coverage combine .coverage-results/.coverage* + coverage report --show-missing --fail-under=100 From a562a5d8f530b41078062612b9916bc76882f211 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 Jan 2022 12:47:24 -0500 Subject: [PATCH 09/14] feat: add api key support (#148) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: upgrade gapic-generator-java, gax-java and gapic-generator-python PiperOrigin-RevId: 423842556 Source-Link: https://github.com/googleapis/googleapis/commit/a616ca08f4b1416abbac7bc5dd6d61c791756a81 Source-Link: https://github.com/googleapis/googleapis-gen/commit/29b938c58c1e51d019f2ee539d55dc0a3c86a905 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjliOTM4YzU4YzFlNTFkMDE5ZjJlZTUzOWQ1NWRjMGEzYzg2YTkwNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/lookup_service/async_client.py | 38 ++++- .../services/lookup_service/client.py | 127 +++++++++++------ .../registration_service/async_client.py | 38 ++++- .../services/registration_service/client.py | 127 +++++++++++------ .../services/lookup_service/async_client.py | 38 ++++- .../services/lookup_service/client.py | 127 +++++++++++------ .../registration_service/async_client.py | 38 ++++- .../services/registration_service/client.py | 127 +++++++++++------ .../test_lookup_service.py | 128 +++++++++++++++++ .../test_registration_service.py | 131 ++++++++++++++++++ .../test_lookup_service.py | 128 +++++++++++++++++ .../test_registration_service.py | 131 ++++++++++++++++++ 12 files changed, 1002 insertions(+), 176 deletions(-) diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py index 51a48b33..b7a32767 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -108,6 +108,42 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): from_service_account_json = from_service_account_file + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + return LookupServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore + @property def transport(self) -> LookupServiceTransport: """Returns the transport used by the client instance. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1/services/lookup_service/client.py index b5826c31..6899ddff 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/client.py @@ -254,6 +254,73 @@ def parse_common_location_path(path: str) -> Dict[str, str]: m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) return m.groupdict() if m else {} + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + def __init__( self, *, @@ -304,57 +371,22 @@ def __init__( if client_options is None: client_options = client_options_lib.ClientOptions() - # Create SSL credentials for mutual TLS if needed. - if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( - "true", - "false", - ): - raise ValueError( - "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" - ) - use_client_cert = ( - os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" + api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( + client_options ) - client_cert_source_func = None - is_mtls = False - if use_client_cert: - if client_options.client_cert_source: - is_mtls = True - client_cert_source_func = client_options.client_cert_source - else: - is_mtls = mtls.has_default_client_cert_source() - if is_mtls: - client_cert_source_func = mtls.default_client_cert_source() - else: - client_cert_source_func = None - - # Figure out which api endpoint to use. - if client_options.api_endpoint is not None: - api_endpoint = client_options.api_endpoint - else: - use_mtls_env = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") - if use_mtls_env == "never": - api_endpoint = self.DEFAULT_ENDPOINT - elif use_mtls_env == "always": - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - elif use_mtls_env == "auto": - if is_mtls: - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - else: - api_endpoint = self.DEFAULT_ENDPOINT - else: - raise MutualTLSChannelError( - "Unsupported GOOGLE_API_USE_MTLS_ENDPOINT value. Accepted " - "values: never, auto, always" - ) + api_key_value = getattr(client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) # Save or instantiate the transport. # Ordinarily, we provide the transport, but allowing a custom transport # instance provides an extensibility point for unusual situations. if isinstance(transport, LookupServiceTransport): # transport is a LookupServiceTransport instance. - if credentials or client_options.credentials_file: + if credentials or client_options.credentials_file or api_key_value: raise ValueError( "When providing a transport instance, " "provide its credentials directly." @@ -366,6 +398,15 @@ def __init__( ) self._transport = transport else: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + Transport = type(self).get_transport_class(transport) self._transport = Transport( credentials=credentials, diff --git a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py index c59328e5..bba92db2 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -134,6 +134,42 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): from_service_account_json = from_service_account_file + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + return RegistrationServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore + @property def transport(self) -> RegistrationServiceTransport: """Returns the transport used by the client instance. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/client.py b/google/cloud/servicedirectory_v1/services/registration_service/client.py index 7b3de0f0..f6b96d5c 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/client.py @@ -298,6 +298,73 @@ def parse_common_location_path(path: str) -> Dict[str, str]: m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) return m.groupdict() if m else {} + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + def __init__( self, *, @@ -348,57 +415,22 @@ def __init__( if client_options is None: client_options = client_options_lib.ClientOptions() - # Create SSL credentials for mutual TLS if needed. - if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( - "true", - "false", - ): - raise ValueError( - "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" - ) - use_client_cert = ( - os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" + api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( + client_options ) - client_cert_source_func = None - is_mtls = False - if use_client_cert: - if client_options.client_cert_source: - is_mtls = True - client_cert_source_func = client_options.client_cert_source - else: - is_mtls = mtls.has_default_client_cert_source() - if is_mtls: - client_cert_source_func = mtls.default_client_cert_source() - else: - client_cert_source_func = None - - # Figure out which api endpoint to use. - if client_options.api_endpoint is not None: - api_endpoint = client_options.api_endpoint - else: - use_mtls_env = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") - if use_mtls_env == "never": - api_endpoint = self.DEFAULT_ENDPOINT - elif use_mtls_env == "always": - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - elif use_mtls_env == "auto": - if is_mtls: - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - else: - api_endpoint = self.DEFAULT_ENDPOINT - else: - raise MutualTLSChannelError( - "Unsupported GOOGLE_API_USE_MTLS_ENDPOINT value. Accepted " - "values: never, auto, always" - ) + api_key_value = getattr(client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) # Save or instantiate the transport. # Ordinarily, we provide the transport, but allowing a custom transport # instance provides an extensibility point for unusual situations. if isinstance(transport, RegistrationServiceTransport): # transport is a RegistrationServiceTransport instance. - if credentials or client_options.credentials_file: + if credentials or client_options.credentials_file or api_key_value: raise ValueError( "When providing a transport instance, " "provide its credentials directly." @@ -410,6 +442,15 @@ def __init__( ) self._transport = transport else: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + Transport = type(self).get_transport_class(transport) self._transport = Transport( credentials=credentials, diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py index 02fc2847..418efa1c 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -110,6 +110,42 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): from_service_account_json = from_service_account_file + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + return LookupServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore + @property def transport(self) -> LookupServiceTransport: """Returns the transport used by the client instance. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py index 9b57d6bd..138d6888 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py @@ -270,6 +270,73 @@ def parse_common_location_path(path: str) -> Dict[str, str]: m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) return m.groupdict() if m else {} + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + def __init__( self, *, @@ -320,57 +387,22 @@ def __init__( if client_options is None: client_options = client_options_lib.ClientOptions() - # Create SSL credentials for mutual TLS if needed. - if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( - "true", - "false", - ): - raise ValueError( - "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" - ) - use_client_cert = ( - os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" + api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( + client_options ) - client_cert_source_func = None - is_mtls = False - if use_client_cert: - if client_options.client_cert_source: - is_mtls = True - client_cert_source_func = client_options.client_cert_source - else: - is_mtls = mtls.has_default_client_cert_source() - if is_mtls: - client_cert_source_func = mtls.default_client_cert_source() - else: - client_cert_source_func = None - - # Figure out which api endpoint to use. - if client_options.api_endpoint is not None: - api_endpoint = client_options.api_endpoint - else: - use_mtls_env = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") - if use_mtls_env == "never": - api_endpoint = self.DEFAULT_ENDPOINT - elif use_mtls_env == "always": - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - elif use_mtls_env == "auto": - if is_mtls: - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - else: - api_endpoint = self.DEFAULT_ENDPOINT - else: - raise MutualTLSChannelError( - "Unsupported GOOGLE_API_USE_MTLS_ENDPOINT value. Accepted " - "values: never, auto, always" - ) + api_key_value = getattr(client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) # Save or instantiate the transport. # Ordinarily, we provide the transport, but allowing a custom transport # instance provides an extensibility point for unusual situations. if isinstance(transport, LookupServiceTransport): # transport is a LookupServiceTransport instance. - if credentials or client_options.credentials_file: + if credentials or client_options.credentials_file or api_key_value: raise ValueError( "When providing a transport instance, " "provide its credentials directly." @@ -382,6 +414,15 @@ def __init__( ) self._transport = transport else: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + Transport = type(self).get_transport_class(transport) self._transport = Transport( credentials=credentials, diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py index 06a571e5..20af6b16 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py @@ -16,7 +16,7 @@ from collections import OrderedDict import functools import re -from typing import Dict, Sequence, Tuple, Type, Union +from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core.client_options import ClientOptions @@ -138,6 +138,42 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): from_service_account_json = from_service_account_file + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + return RegistrationServiceClient.get_mtls_endpoint_and_cert_source(client_options) # type: ignore + @property def transport(self) -> RegistrationServiceTransport: """Returns the transport used by the client instance. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py index ffe1e482..d62a044d 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py @@ -316,6 +316,73 @@ def parse_common_location_path(path: str) -> Dict[str, str]: m = re.match(r"^projects/(?P.+?)/locations/(?P.+?)$", path) return m.groupdict() if m else {} + @classmethod + def get_mtls_endpoint_and_cert_source( + cls, client_options: Optional[client_options_lib.ClientOptions] = None + ): + """Return the API endpoint and client cert source for mutual TLS. + + The client cert source is determined in the following order: + (1) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is not "true", the + client cert source is None. + (2) if `client_options.client_cert_source` is provided, use the provided one; if the + default client cert source exists, use the default one; otherwise the client cert + source is None. + + The API endpoint is determined in the following order: + (1) if `client_options.api_endpoint` if provided, use the provided one. + (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the + default mTLS endpoint; if the environment variabel is "never", use the default API + endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise + use the default API endpoint. + + More details can be found at https://google.aip.dev/auth/4114. + + Args: + client_options (google.api_core.client_options.ClientOptions): Custom options for the + client. Only the `api_endpoint` and `client_cert_source` properties may be used + in this method. + + Returns: + Tuple[str, Callable[[], Tuple[bytes, bytes]]]: returns the API endpoint and the + client cert source to use. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If any errors happen. + """ + if client_options is None: + client_options = client_options_lib.ClientOptions() + use_client_cert = os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") + use_mtls_endpoint = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") + if use_client_cert not in ("true", "false"): + raise ValueError( + "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" + ) + if use_mtls_endpoint not in ("auto", "never", "always"): + raise MutualTLSChannelError( + "Environment variable `GOOGLE_API_USE_MTLS_ENDPOINT` must be `never`, `auto` or `always`" + ) + + # Figure out the client cert source to use. + client_cert_source = None + if use_client_cert == "true": + if client_options.client_cert_source: + client_cert_source = client_options.client_cert_source + elif mtls.has_default_client_cert_source(): + client_cert_source = mtls.default_client_cert_source() + + # Figure out which api endpoint to use. + if client_options.api_endpoint is not None: + api_endpoint = client_options.api_endpoint + elif use_mtls_endpoint == "always" or ( + use_mtls_endpoint == "auto" and client_cert_source + ): + api_endpoint = cls.DEFAULT_MTLS_ENDPOINT + else: + api_endpoint = cls.DEFAULT_ENDPOINT + + return api_endpoint, client_cert_source + def __init__( self, *, @@ -366,57 +433,22 @@ def __init__( if client_options is None: client_options = client_options_lib.ClientOptions() - # Create SSL credentials for mutual TLS if needed. - if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in ( - "true", - "false", - ): - raise ValueError( - "Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`" - ) - use_client_cert = ( - os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true" + api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source( + client_options ) - client_cert_source_func = None - is_mtls = False - if use_client_cert: - if client_options.client_cert_source: - is_mtls = True - client_cert_source_func = client_options.client_cert_source - else: - is_mtls = mtls.has_default_client_cert_source() - if is_mtls: - client_cert_source_func = mtls.default_client_cert_source() - else: - client_cert_source_func = None - - # Figure out which api endpoint to use. - if client_options.api_endpoint is not None: - api_endpoint = client_options.api_endpoint - else: - use_mtls_env = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") - if use_mtls_env == "never": - api_endpoint = self.DEFAULT_ENDPOINT - elif use_mtls_env == "always": - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - elif use_mtls_env == "auto": - if is_mtls: - api_endpoint = self.DEFAULT_MTLS_ENDPOINT - else: - api_endpoint = self.DEFAULT_ENDPOINT - else: - raise MutualTLSChannelError( - "Unsupported GOOGLE_API_USE_MTLS_ENDPOINT value. Accepted " - "values: never, auto, always" - ) + api_key_value = getattr(client_options, "api_key", None) + if api_key_value and credentials: + raise ValueError( + "client_options.api_key and credentials are mutually exclusive" + ) # Save or instantiate the transport. # Ordinarily, we provide the transport, but allowing a custom transport # instance provides an extensibility point for unusual situations. if isinstance(transport, RegistrationServiceTransport): # transport is a RegistrationServiceTransport instance. - if credentials or client_options.credentials_file: + if credentials or client_options.credentials_file or api_key_value: raise ValueError( "When providing a transport instance, " "provide its credentials directly." @@ -428,6 +460,15 @@ def __init__( ) self._transport = transport else: + import google.auth._default # type: ignore + + if api_key_value and hasattr( + google.auth._default, "get_api_key_credentials" + ): + credentials = google.auth._default.get_api_key_credentials( + api_key_value + ) + Transport = type(self).get_transport_class(transport) self._transport = Transport( credentials=credentials, diff --git a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py index 7d88cc10..a80f0480 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py @@ -397,6 +397,87 @@ def test_lookup_service_client_mtls_env_auto( ) +@pytest.mark.parametrize( + "client_class", [LookupServiceClient, LookupServiceAsyncClient] +) +@mock.patch.object( + LookupServiceClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(LookupServiceClient), +) +@mock.patch.object( + LookupServiceAsyncClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(LookupServiceAsyncClient), +) +def test_lookup_service_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + @pytest.mark.parametrize( "client_class,transport_class,transport_name", [ @@ -626,6 +707,23 @@ def test_credentials_transport_error(): transport=transport, ) + # It is an error to provide an api_key and a transport instance. + transport = transports.LookupServiceGrpcTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = LookupServiceClient(client_options=options, transport=transport,) + + # It is an error to provide an api_key and a credential. + options = mock.Mock() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = LookupServiceClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + # It is an error to provide scopes and a transport instance. transport = transports.LookupServiceGrpcTransport( credentials=ga_credentials.AnonymousCredentials(), @@ -1217,3 +1315,33 @@ def test_client_ctx(): with client: pass close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (LookupServiceClient, transports.LookupServiceGrpcTransport), + (LookupServiceAsyncClient, transports.LookupServiceGrpcAsyncIOTransport), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) diff --git a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py index a7ceb143..67eafc61 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py @@ -425,6 +425,87 @@ def test_registration_service_client_mtls_env_auto( ) +@pytest.mark.parametrize( + "client_class", [RegistrationServiceClient, RegistrationServiceAsyncClient] +) +@mock.patch.object( + RegistrationServiceClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegistrationServiceClient), +) +@mock.patch.object( + RegistrationServiceAsyncClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegistrationServiceAsyncClient), +) +def test_registration_service_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + @pytest.mark.parametrize( "client_class,transport_class,transport_name", [ @@ -4717,6 +4798,23 @@ def test_credentials_transport_error(): transport=transport, ) + # It is an error to provide an api_key and a transport instance. + transport = transports.RegistrationServiceGrpcTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegistrationServiceClient(client_options=options, transport=transport,) + + # It is an error to provide an api_key and a credential. + options = mock.Mock() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegistrationServiceClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + # It is an error to provide scopes and a transport instance. transport = transports.RegistrationServiceGrpcTransport( credentials=ga_credentials.AnonymousCredentials(), @@ -5359,3 +5457,36 @@ def test_client_ctx(): with client: pass close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (RegistrationServiceClient, transports.RegistrationServiceGrpcTransport), + ( + RegistrationServiceAsyncClient, + transports.RegistrationServiceGrpcAsyncIOTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py index d375722d..cc243665 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py @@ -399,6 +399,87 @@ def test_lookup_service_client_mtls_env_auto( ) +@pytest.mark.parametrize( + "client_class", [LookupServiceClient, LookupServiceAsyncClient] +) +@mock.patch.object( + LookupServiceClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(LookupServiceClient), +) +@mock.patch.object( + LookupServiceAsyncClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(LookupServiceAsyncClient), +) +def test_lookup_service_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + @pytest.mark.parametrize( "client_class,transport_class,transport_name", [ @@ -628,6 +709,23 @@ def test_credentials_transport_error(): transport=transport, ) + # It is an error to provide an api_key and a transport instance. + transport = transports.LookupServiceGrpcTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = LookupServiceClient(client_options=options, transport=transport,) + + # It is an error to provide an api_key and a credential. + options = mock.Mock() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = LookupServiceClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + # It is an error to provide scopes and a transport instance. transport = transports.LookupServiceGrpcTransport( credentials=ga_credentials.AnonymousCredentials(), @@ -1241,3 +1339,33 @@ def test_client_ctx(): with client: pass close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (LookupServiceClient, transports.LookupServiceGrpcTransport), + (LookupServiceAsyncClient, transports.LookupServiceGrpcAsyncIOTransport), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py index 6ca0bce5..f88e37db 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py @@ -428,6 +428,87 @@ def test_registration_service_client_mtls_env_auto( ) +@pytest.mark.parametrize( + "client_class", [RegistrationServiceClient, RegistrationServiceAsyncClient] +) +@mock.patch.object( + RegistrationServiceClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegistrationServiceClient), +) +@mock.patch.object( + RegistrationServiceAsyncClient, + "DEFAULT_ENDPOINT", + modify_default_endpoint(RegistrationServiceAsyncClient), +) +def test_registration_service_client_get_mtls_endpoint_and_cert_source(client_class): + mock_client_cert_source = mock.Mock() + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "true". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source == mock_client_cert_source + + # Test the case GOOGLE_API_USE_CLIENT_CERTIFICATE is "false". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "false"}): + mock_client_cert_source = mock.Mock() + mock_api_endpoint = "foo" + options = client_options.ClientOptions( + client_cert_source=mock_client_cert_source, api_endpoint=mock_api_endpoint + ) + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source( + options + ) + assert api_endpoint == mock_api_endpoint + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "never". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "always". + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert doesn't exist. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=False, + ): + api_endpoint, cert_source = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_ENDPOINT + assert cert_source is None + + # Test the case GOOGLE_API_USE_MTLS_ENDPOINT is "auto" and default cert exists. + with mock.patch.dict(os.environ, {"GOOGLE_API_USE_CLIENT_CERTIFICATE": "true"}): + with mock.patch( + "google.auth.transport.mtls.has_default_client_cert_source", + return_value=True, + ): + with mock.patch( + "google.auth.transport.mtls.default_client_cert_source", + return_value=mock_client_cert_source, + ): + ( + api_endpoint, + cert_source, + ) = client_class.get_mtls_endpoint_and_cert_source() + assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT + assert cert_source == mock_client_cert_source + + @pytest.mark.parametrize( "client_class,transport_class,transport_name", [ @@ -4750,6 +4831,23 @@ def test_credentials_transport_error(): transport=transport, ) + # It is an error to provide an api_key and a transport instance. + transport = transports.RegistrationServiceGrpcTransport( + credentials=ga_credentials.AnonymousCredentials(), + ) + options = client_options.ClientOptions() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegistrationServiceClient(client_options=options, transport=transport,) + + # It is an error to provide an api_key and a credential. + options = mock.Mock() + options.api_key = "api_key" + with pytest.raises(ValueError): + client = RegistrationServiceClient( + client_options=options, credentials=ga_credentials.AnonymousCredentials() + ) + # It is an error to provide scopes and a transport instance. transport = transports.RegistrationServiceGrpcTransport( credentials=ga_credentials.AnonymousCredentials(), @@ -5414,3 +5512,36 @@ def test_client_ctx(): with client: pass close.assert_called() + + +@pytest.mark.parametrize( + "client_class,transport_class", + [ + (RegistrationServiceClient, transports.RegistrationServiceGrpcTransport), + ( + RegistrationServiceAsyncClient, + transports.RegistrationServiceGrpcAsyncIOTransport, + ), + ], +) +def test_api_key_credentials(client_class, transport_class): + with mock.patch.object( + google.auth._default, "get_api_key_credentials", create=True + ) as get_api_key_credentials: + mock_cred = mock.Mock() + get_api_key_credentials.return_value = mock_cred + options = client_options.ClientOptions() + options.api_key = "api_key" + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options) + patched.assert_called_once_with( + credentials=mock_cred, + credentials_file=None, + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) From 55c52b5b67891ac723a34fae22040feb5b5fcf15 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 12:58:55 +0000 Subject: [PATCH 10/14] chore: use gapic-generator-python 0.62.1 (#151) - [ ] Regenerate this pull request now. fix: resolve DuplicateCredentialArgs error when using credentials_file committer: parthea PiperOrigin-RevId: 425964861 Source-Link: https://github.com/googleapis/googleapis/commit/84b1a5a4f6fb2d04905be58e586b8a7a4310a8cf Source-Link: https://github.com/googleapis/googleapis-gen/commit/4fb761bbd8506ac156f49bac5f18306aa8eb3aa8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGZiNzYxYmJkODUwNmFjMTU2ZjQ5YmFjNWYxODMwNmFhOGViM2FhOCJ9 --- .../lookup_service/transports/grpc.py | 5 +- .../lookup_service/transports/grpc_asyncio.py | 5 +- .../registration_service/async_client.py | 30 +++---- .../services/registration_service/client.py | 30 +++---- .../registration_service/transports/grpc.py | 5 +- .../transports/grpc_asyncio.py | 5 +- .../lookup_service/transports/grpc.py | 5 +- .../lookup_service/transports/grpc_asyncio.py | 5 +- .../registration_service/async_client.py | 30 +++---- .../services/registration_service/client.py | 30 +++---- .../registration_service/transports/grpc.py | 5 +- .../transports/grpc_asyncio.py | 5 +- .../test_lookup_service.py | 79 ++++++++++++++++++- .../test_registration_service.py | 73 ++++++++++++++++- .../test_lookup_service.py | 79 ++++++++++++++++++- .../test_registration_service.py | 73 ++++++++++++++++- 16 files changed, 386 insertions(+), 78 deletions(-) diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py index c8178ab4..f0460f4f 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py @@ -158,8 +158,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py index dafe43dd..716fbfec 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py @@ -203,8 +203,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py index bba92db2..a9699b86 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py @@ -291,7 +291,7 @@ async def create_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, namespace, namespace_id]) if request is not None and has_flattened_params: @@ -370,7 +370,7 @@ async def list_namespaces( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -449,7 +449,7 @@ async def get_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -528,7 +528,7 @@ async def update_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([namespace, update_mask]) if request is not None and has_flattened_params: @@ -598,7 +598,7 @@ async def delete_namespace( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -692,7 +692,7 @@ async def create_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, service, service_id]) if request is not None and has_flattened_params: @@ -771,7 +771,7 @@ async def list_services( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -853,7 +853,7 @@ async def get_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -932,7 +932,7 @@ async def update_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([service, update_mask]) if request is not None and has_flattened_params: @@ -1002,7 +1002,7 @@ async def delete_service( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1095,7 +1095,7 @@ async def create_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, endpoint, endpoint_id]) if request is not None and has_flattened_params: @@ -1174,7 +1174,7 @@ async def list_endpoints( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -1254,7 +1254,7 @@ async def get_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1332,7 +1332,7 @@ async def update_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([endpoint, update_mask]) if request is not None and has_flattened_params: @@ -1401,7 +1401,7 @@ async def delete_endpoint( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: diff --git a/google/cloud/servicedirectory_v1/services/registration_service/client.py b/google/cloud/servicedirectory_v1/services/registration_service/client.py index f6b96d5c..9677a2e1 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/client.py @@ -523,7 +523,7 @@ def create_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, namespace, namespace_id]) if request is not None and has_flattened_params: @@ -602,7 +602,7 @@ def list_namespaces( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -681,7 +681,7 @@ def get_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -760,7 +760,7 @@ def update_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([namespace, update_mask]) if request is not None and has_flattened_params: @@ -830,7 +830,7 @@ def delete_namespace( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -924,7 +924,7 @@ def create_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, service, service_id]) if request is not None and has_flattened_params: @@ -1003,7 +1003,7 @@ def list_services( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -1085,7 +1085,7 @@ def get_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1164,7 +1164,7 @@ def update_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([service, update_mask]) if request is not None and has_flattened_params: @@ -1234,7 +1234,7 @@ def delete_service( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1327,7 +1327,7 @@ def create_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, endpoint, endpoint_id]) if request is not None and has_flattened_params: @@ -1406,7 +1406,7 @@ def list_endpoints( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -1486,7 +1486,7 @@ def get_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1564,7 +1564,7 @@ def update_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([endpoint, update_mask]) if request is not None and has_flattened_params: @@ -1633,7 +1633,7 @@ def delete_endpoint( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py index 6de1f18e..574d11e3 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py @@ -181,8 +181,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py index a110b247..28ca4444 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py @@ -226,8 +226,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py index 6965a866..968bd547 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py @@ -158,8 +158,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py index 94edfdb3..ddb7a934 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py @@ -203,8 +203,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py index 20af6b16..8849b038 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py @@ -295,7 +295,7 @@ async def create_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, namespace, namespace_id]) if request is not None and has_flattened_params: @@ -374,7 +374,7 @@ async def list_namespaces( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -453,7 +453,7 @@ async def get_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -532,7 +532,7 @@ async def update_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([namespace, update_mask]) if request is not None and has_flattened_params: @@ -602,7 +602,7 @@ async def delete_namespace( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -696,7 +696,7 @@ async def create_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, service, service_id]) if request is not None and has_flattened_params: @@ -775,7 +775,7 @@ async def list_services( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -857,7 +857,7 @@ async def get_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -936,7 +936,7 @@ async def update_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([service, update_mask]) if request is not None and has_flattened_params: @@ -1006,7 +1006,7 @@ async def delete_service( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1099,7 +1099,7 @@ async def create_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, endpoint, endpoint_id]) if request is not None and has_flattened_params: @@ -1178,7 +1178,7 @@ async def list_endpoints( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -1258,7 +1258,7 @@ async def get_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1336,7 +1336,7 @@ async def update_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([endpoint, update_mask]) if request is not None and has_flattened_params: @@ -1405,7 +1405,7 @@ async def delete_endpoint( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py index d62a044d..b1faf7b3 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py @@ -541,7 +541,7 @@ def create_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, namespace, namespace_id]) if request is not None and has_flattened_params: @@ -620,7 +620,7 @@ def list_namespaces( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -699,7 +699,7 @@ def get_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -778,7 +778,7 @@ def update_namespace( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([namespace, update_mask]) if request is not None and has_flattened_params: @@ -848,7 +848,7 @@ def delete_namespace( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -942,7 +942,7 @@ def create_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, service, service_id]) if request is not None and has_flattened_params: @@ -1021,7 +1021,7 @@ def list_services( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -1103,7 +1103,7 @@ def get_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1182,7 +1182,7 @@ def update_service( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([service, update_mask]) if request is not None and has_flattened_params: @@ -1252,7 +1252,7 @@ def delete_service( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1345,7 +1345,7 @@ def create_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, endpoint, endpoint_id]) if request is not None and has_flattened_params: @@ -1424,7 +1424,7 @@ def list_endpoints( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent]) if request is not None and has_flattened_params: @@ -1504,7 +1504,7 @@ def get_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: @@ -1582,7 +1582,7 @@ def update_endpoint( """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([endpoint, update_mask]) if request is not None and has_flattened_params: @@ -1651,7 +1651,7 @@ def delete_endpoint( sent along with the request as metadata. """ # Create or coerce a protobuf request object. - # Sanity check: If we got a request object, we should *not* have + # Quick check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([name]) if request is not None and has_flattened_params: diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py index 353ee64d..5b993a21 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py @@ -182,8 +182,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py index 304b3f95..eca442bc 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py @@ -227,8 +227,11 @@ def __init__( if not self._grpc_channel: self._grpc_channel = type(self).create_channel( self._host, + # use the credentials which are saved credentials=self._credentials, - credentials_file=credentials_file, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, scopes=self._scopes, ssl_credentials=self._ssl_channel_credentials, quota_project_id=quota_project_id, diff --git a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py index a80f0480..607015da 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py @@ -510,21 +510,28 @@ def test_lookup_service_client_client_options_scopes( @pytest.mark.parametrize( - "client_class,transport_class,transport_name", + "client_class,transport_class,transport_name,grpc_helpers", [ - (LookupServiceClient, transports.LookupServiceGrpcTransport, "grpc"), + ( + LookupServiceClient, + transports.LookupServiceGrpcTransport, + "grpc", + grpc_helpers, + ), ( LookupServiceAsyncClient, transports.LookupServiceGrpcAsyncIOTransport, "grpc_asyncio", + grpc_helpers_async, ), ], ) def test_lookup_service_client_client_options_credentials_file( - client_class, transport_class, transport_name + client_class, transport_class, transport_name, grpc_helpers ): # Check the case credentials file is provided. options = client_options.ClientOptions(credentials_file="credentials.json") + with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None client = client_class(client_options=options, transport=transport_name) @@ -560,6 +567,72 @@ def test_lookup_service_client_client_options_from_dict(): ) +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + LookupServiceClient, + transports.LookupServiceGrpcTransport, + "grpc", + grpc_helpers, + ), + ( + LookupServiceAsyncClient, + transports.LookupServiceGrpcAsyncIOTransport, + "grpc_asyncio", + grpc_helpers_async, + ), + ], +) +def test_lookup_service_client_create_channel_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) + + # test that the credentials from file are saved and used as the credentials. + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch.object( + google.auth, "default", autospec=True + ) as adc, mock.patch.object( + grpc_helpers, "create_channel" + ) as create_channel: + creds = ga_credentials.AnonymousCredentials() + file_creds = ga_credentials.AnonymousCredentials() + load_creds.return_value = (file_creds, None) + adc.return_value = (creds, None) + client = client_class(client_options=options, transport=transport_name) + create_channel.assert_called_with( + "servicedirectory.googleapis.com:443", + credentials=file_creds, + credentials_file=None, + quota_project_id=None, + default_scopes=("https://www.googleapis.com/auth/cloud-platform",), + scopes=None, + default_host="servicedirectory.googleapis.com", + ssl_credentials=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + @pytest.mark.parametrize("request_type", [lookup_service.ResolveServiceRequest, dict,]) def test_resolve_service(request_type, transport: str = "grpc"): client = LookupServiceClient( diff --git a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py index 67eafc61..1221422d 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py @@ -542,25 +542,28 @@ def test_registration_service_client_client_options_scopes( @pytest.mark.parametrize( - "client_class,transport_class,transport_name", + "client_class,transport_class,transport_name,grpc_helpers", [ ( RegistrationServiceClient, transports.RegistrationServiceGrpcTransport, "grpc", + grpc_helpers, ), ( RegistrationServiceAsyncClient, transports.RegistrationServiceGrpcAsyncIOTransport, "grpc_asyncio", + grpc_helpers_async, ), ], ) def test_registration_service_client_client_options_credentials_file( - client_class, transport_class, transport_name + client_class, transport_class, transport_name, grpc_helpers ): # Check the case credentials file is provided. options = client_options.ClientOptions(credentials_file="credentials.json") + with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None client = client_class(client_options=options, transport=transport_name) @@ -596,6 +599,72 @@ def test_registration_service_client_client_options_from_dict(): ) +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegistrationServiceClient, + transports.RegistrationServiceGrpcTransport, + "grpc", + grpc_helpers, + ), + ( + RegistrationServiceAsyncClient, + transports.RegistrationServiceGrpcAsyncIOTransport, + "grpc_asyncio", + grpc_helpers_async, + ), + ], +) +def test_registration_service_client_create_channel_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) + + # test that the credentials from file are saved and used as the credentials. + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch.object( + google.auth, "default", autospec=True + ) as adc, mock.patch.object( + grpc_helpers, "create_channel" + ) as create_channel: + creds = ga_credentials.AnonymousCredentials() + file_creds = ga_credentials.AnonymousCredentials() + load_creds.return_value = (file_creds, None) + adc.return_value = (creds, None) + client = client_class(client_options=options, transport=transport_name) + create_channel.assert_called_with( + "servicedirectory.googleapis.com:443", + credentials=file_creds, + credentials_file=None, + quota_project_id=None, + default_scopes=("https://www.googleapis.com/auth/cloud-platform",), + scopes=None, + default_host="servicedirectory.googleapis.com", + ssl_credentials=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + @pytest.mark.parametrize( "request_type", [registration_service.CreateNamespaceRequest, dict,] ) diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py index cc243665..83b48538 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py @@ -512,21 +512,28 @@ def test_lookup_service_client_client_options_scopes( @pytest.mark.parametrize( - "client_class,transport_class,transport_name", + "client_class,transport_class,transport_name,grpc_helpers", [ - (LookupServiceClient, transports.LookupServiceGrpcTransport, "grpc"), + ( + LookupServiceClient, + transports.LookupServiceGrpcTransport, + "grpc", + grpc_helpers, + ), ( LookupServiceAsyncClient, transports.LookupServiceGrpcAsyncIOTransport, "grpc_asyncio", + grpc_helpers_async, ), ], ) def test_lookup_service_client_client_options_credentials_file( - client_class, transport_class, transport_name + client_class, transport_class, transport_name, grpc_helpers ): # Check the case credentials file is provided. options = client_options.ClientOptions(credentials_file="credentials.json") + with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None client = client_class(client_options=options, transport=transport_name) @@ -562,6 +569,72 @@ def test_lookup_service_client_client_options_from_dict(): ) +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + LookupServiceClient, + transports.LookupServiceGrpcTransport, + "grpc", + grpc_helpers, + ), + ( + LookupServiceAsyncClient, + transports.LookupServiceGrpcAsyncIOTransport, + "grpc_asyncio", + grpc_helpers_async, + ), + ], +) +def test_lookup_service_client_create_channel_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) + + # test that the credentials from file are saved and used as the credentials. + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch.object( + google.auth, "default", autospec=True + ) as adc, mock.patch.object( + grpc_helpers, "create_channel" + ) as create_channel: + creds = ga_credentials.AnonymousCredentials() + file_creds = ga_credentials.AnonymousCredentials() + load_creds.return_value = (file_creds, None) + adc.return_value = (creds, None) + client = client_class(client_options=options, transport=transport_name) + create_channel.assert_called_with( + "servicedirectory.googleapis.com:443", + credentials=file_creds, + credentials_file=None, + quota_project_id=None, + default_scopes=("https://www.googleapis.com/auth/cloud-platform",), + scopes=None, + default_host="servicedirectory.googleapis.com", + ssl_credentials=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + @pytest.mark.parametrize("request_type", [lookup_service.ResolveServiceRequest, dict,]) def test_resolve_service(request_type, transport: str = "grpc"): client = LookupServiceClient( diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py index f88e37db..8ee9f978 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py @@ -545,25 +545,28 @@ def test_registration_service_client_client_options_scopes( @pytest.mark.parametrize( - "client_class,transport_class,transport_name", + "client_class,transport_class,transport_name,grpc_helpers", [ ( RegistrationServiceClient, transports.RegistrationServiceGrpcTransport, "grpc", + grpc_helpers, ), ( RegistrationServiceAsyncClient, transports.RegistrationServiceGrpcAsyncIOTransport, "grpc_asyncio", + grpc_helpers_async, ), ], ) def test_registration_service_client_client_options_credentials_file( - client_class, transport_class, transport_name + client_class, transport_class, transport_name, grpc_helpers ): # Check the case credentials file is provided. options = client_options.ClientOptions(credentials_file="credentials.json") + with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None client = client_class(client_options=options, transport=transport_name) @@ -599,6 +602,72 @@ def test_registration_service_client_client_options_from_dict(): ) +@pytest.mark.parametrize( + "client_class,transport_class,transport_name,grpc_helpers", + [ + ( + RegistrationServiceClient, + transports.RegistrationServiceGrpcTransport, + "grpc", + grpc_helpers, + ), + ( + RegistrationServiceAsyncClient, + transports.RegistrationServiceGrpcAsyncIOTransport, + "grpc_asyncio", + grpc_helpers_async, + ), + ], +) +def test_registration_service_client_create_channel_credentials_file( + client_class, transport_class, transport_name, grpc_helpers +): + # Check the case credentials file is provided. + options = client_options.ClientOptions(credentials_file="credentials.json") + + with mock.patch.object(transport_class, "__init__") as patched: + patched.return_value = None + client = client_class(client_options=options, transport=transport_name) + patched.assert_called_once_with( + credentials=None, + credentials_file="credentials.json", + host=client.DEFAULT_ENDPOINT, + scopes=None, + client_cert_source_for_mtls=None, + quota_project_id=None, + client_info=transports.base.DEFAULT_CLIENT_INFO, + always_use_jwt_access=True, + ) + + # test that the credentials from file are saved and used as the credentials. + with mock.patch.object( + google.auth, "load_credentials_from_file", autospec=True + ) as load_creds, mock.patch.object( + google.auth, "default", autospec=True + ) as adc, mock.patch.object( + grpc_helpers, "create_channel" + ) as create_channel: + creds = ga_credentials.AnonymousCredentials() + file_creds = ga_credentials.AnonymousCredentials() + load_creds.return_value = (file_creds, None) + adc.return_value = (creds, None) + client = client_class(client_options=options, transport=transport_name) + create_channel.assert_called_with( + "servicedirectory.googleapis.com:443", + credentials=file_creds, + credentials_file=None, + quota_project_id=None, + default_scopes=("https://www.googleapis.com/auth/cloud-platform",), + scopes=None, + default_host="servicedirectory.googleapis.com", + ssl_credentials=None, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + @pytest.mark.parametrize( "request_type", [registration_service.CreateNamespaceRequest, dict,] ) From 8251cd97926070e101dd597eb70c2aa4ef5e986c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 15:38:11 -0700 Subject: [PATCH 11/14] chore: use gapic-generator-python 0.63.2 (#153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.63.2 docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: https://github.com/googleapis/googleapis/commit/55b9e1e0b3106c850d13958352bc0751147b6b15 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../services/lookup_service/async_client.py | 20 + .../services/lookup_service/client.py | 21 + .../registration_service/async_client.py | 342 ++++ .../services/registration_service/client.py | 360 ++++ .../services/lookup_service/async_client.py | 20 + .../services/lookup_service/client.py | 21 + .../registration_service/async_client.py | 342 ++++ .../services/registration_service/client.py | 360 ++++ ...v1_lookup_service_resolve_service_async.py | 45 + ..._v1_lookup_service_resolve_service_sync.py | 45 + ...istration_service_create_endpoint_async.py | 46 + ...gistration_service_create_endpoint_sync.py | 46 + ...stration_service_create_namespace_async.py | 46 + ...istration_service_create_namespace_sync.py | 46 + ...gistration_service_create_service_async.py | 46 + ...egistration_service_create_service_sync.py | 46 + ...istration_service_delete_endpoint_async.py | 43 + ...gistration_service_delete_endpoint_sync.py | 43 + ...stration_service_delete_namespace_async.py | 43 + ...istration_service_delete_namespace_sync.py | 43 + ...gistration_service_delete_service_async.py | 43 + ...egistration_service_delete_service_sync.py | 43 + ...registration_service_get_endpoint_async.py | 45 + ..._registration_service_get_endpoint_sync.py | 45 + ...gistration_service_get_iam_policy_async.py | 45 + ...egistration_service_get_iam_policy_sync.py | 45 + ...egistration_service_get_namespace_async.py | 45 + ...registration_service_get_namespace_sync.py | 45 + ..._registration_service_get_service_async.py | 45 + ...1_registration_service_get_service_sync.py | 45 + ...gistration_service_list_endpoints_async.py | 46 + ...egistration_service_list_endpoints_sync.py | 46 + ...istration_service_list_namespaces_async.py | 46 + ...gistration_service_list_namespaces_sync.py | 46 + ...egistration_service_list_services_async.py | 46 + ...registration_service_list_services_sync.py | 46 + ...gistration_service_set_iam_policy_async.py | 45 + ...egistration_service_set_iam_policy_sync.py | 45 + ...tion_service_test_iam_permissions_async.py | 46 + ...ation_service_test_iam_permissions_sync.py | 46 + ...istration_service_update_endpoint_async.py | 44 + ...gistration_service_update_endpoint_sync.py | 44 + ...stration_service_update_namespace_async.py | 44 + ...istration_service_update_namespace_sync.py | 44 + ...gistration_service_update_service_async.py | 44 + ...egistration_service_update_service_sync.py | 44 + ...a1_lookup_service_resolve_service_async.py | 45 + ...ta1_lookup_service_resolve_service_sync.py | 45 + ...istration_service_create_endpoint_async.py | 46 + ...gistration_service_create_endpoint_sync.py | 46 + ...stration_service_create_namespace_async.py | 46 + ...istration_service_create_namespace_sync.py | 46 + ...gistration_service_create_service_async.py | 46 + ...egistration_service_create_service_sync.py | 46 + ...istration_service_delete_endpoint_async.py | 43 + ...gistration_service_delete_endpoint_sync.py | 43 + ...stration_service_delete_namespace_async.py | 43 + ...istration_service_delete_namespace_sync.py | 43 + ...gistration_service_delete_service_async.py | 43 + ...egistration_service_delete_service_sync.py | 43 + ...registration_service_get_endpoint_async.py | 45 + ..._registration_service_get_endpoint_sync.py | 45 + ...gistration_service_get_iam_policy_async.py | 45 + ...egistration_service_get_iam_policy_sync.py | 45 + ...egistration_service_get_namespace_async.py | 45 + ...registration_service_get_namespace_sync.py | 45 + ..._registration_service_get_service_async.py | 45 + ...1_registration_service_get_service_sync.py | 45 + ...gistration_service_list_endpoints_async.py | 46 + ...egistration_service_list_endpoints_sync.py | 46 + ...istration_service_list_namespaces_async.py | 46 + ...gistration_service_list_namespaces_sync.py | 46 + ...egistration_service_list_services_async.py | 46 + ...registration_service_list_services_sync.py | 46 + ...gistration_service_set_iam_policy_async.py | 45 + ...egistration_service_set_iam_policy_sync.py | 45 + ...tion_service_test_iam_permissions_async.py | 46 + ...ation_service_test_iam_permissions_sync.py | 46 + ...istration_service_update_endpoint_async.py | 44 + ...gistration_service_update_endpoint_sync.py | 44 + ...stration_service_update_namespace_async.py | 44 + ...istration_service_update_namespace_sync.py | 44 + ...gistration_service_update_service_async.py | 44 + ...egistration_service_update_service_sync.py | 44 + .../snippet_metadata_servicedirectory_v1.json | 1683 +++++++++++++++++ ...pet_metadata_servicedirectory_v1beta1.json | 1683 +++++++++++++++++ 86 files changed, 8264 insertions(+) create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py create mode 100644 samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py create mode 100644 samples/generated_samples/snippet_metadata_servicedirectory_v1.json create mode 100644 samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py index b7a32767..c93fcc52 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py @@ -216,6 +216,26 @@ async def resolve_service( and its associated endpoints. Resolving a service is not considered an active developer method. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_resolve_service(): + # Create a client + client = servicedirectory_v1.LookupServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = client.resolve_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.ResolveServiceRequest, dict]): The request object. The request message for diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1/services/lookup_service/client.py index 6899ddff..ad95f69a 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/client.py @@ -431,6 +431,27 @@ def resolve_service( and its associated endpoints. Resolving a service is not considered an active developer method. + + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_resolve_service(): + # Create a client + client = servicedirectory_v1.LookupServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = client.resolve_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.ResolveServiceRequest, dict]): The request object. The request message for diff --git a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py index a9699b86..7f5fd6de 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py @@ -244,6 +244,26 @@ async def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new Namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_create_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = client.create_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.CreateNamespaceRequest, dict]): The request object. The request message for @@ -342,6 +362,26 @@ async def list_namespaces( ) -> pagers.ListNamespacesAsyncPager: r"""Lists all namespaces. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.ListNamespacesRequest, dict]): The request object. The request message for @@ -423,6 +463,25 @@ async def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.GetNamespaceRequest, dict]): The request object. The request message for @@ -497,6 +556,24 @@ async def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_update_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateNamespaceRequest( + ) + + # Make the request + response = client.update_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.UpdateNamespaceRequest, dict]): The request object. The request message for @@ -580,6 +657,23 @@ async def delete_namespace( r"""Deletes a namespace. This also deletes all services and endpoints in the namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + client.delete_namespace(request=request) + Args: request (Union[google.cloud.servicedirectory_v1.types.DeleteNamespaceRequest, dict]): The request object. The request message for @@ -646,6 +740,26 @@ async def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new Service. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_create_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = client.create_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.CreateServiceRequest, dict]): The request object. The request message for @@ -743,6 +857,26 @@ async def list_services( ) -> pagers.ListServicesAsyncPager: r"""Lists all services belonging to a namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_list_services(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.ListServicesRequest, dict]): The request object. The request message for @@ -824,6 +958,25 @@ async def get_service( ) -> service.Service: r"""Gets a service. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.GetServiceRequest, dict]): The request object. The request message for @@ -901,6 +1054,24 @@ async def update_service( ) -> gcs_service.Service: r"""Updates a service. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_update_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateServiceRequest( + ) + + # Make the request + response = client.update_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.UpdateServiceRequest, dict]): The request object. The request message for @@ -984,6 +1155,23 @@ async def delete_service( r"""Deletes a service. This also deletes all endpoints associated with the service. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_delete_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + client.delete_service(request=request) + Args: request (Union[google.cloud.servicedirectory_v1.types.DeleteServiceRequest, dict]): The request object. The request message for @@ -1050,6 +1238,26 @@ async def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates a endpoint, and returns the new Endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = client.create_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.CreateEndpointRequest, dict]): The request object. The request message for @@ -1146,6 +1354,26 @@ async def list_endpoints( ) -> pagers.ListEndpointsAsyncPager: r"""Lists all endpoints. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_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) + Args: request (Union[google.cloud.servicedirectory_v1.types.ListEndpointsRequest, dict]): The request object. The request message for @@ -1227,6 +1455,25 @@ async def get_endpoint( ) -> endpoint.Endpoint: r"""Gets a endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.GetEndpointRequest, dict]): The request object. The request message for @@ -1302,6 +1549,24 @@ async def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates a endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateEndpointRequest( + ) + + # Make the request + response = client.update_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.UpdateEndpointRequest, dict]): The request object. The request message for @@ -1383,6 +1648,22 @@ async def delete_endpoint( ) -> None: r"""Deletes a endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + client.delete_endpoint(request=request) + Args: request (Union[google.cloud.servicedirectory_v1.types.DeleteEndpointRequest, dict]): The request object. The request message for @@ -1447,6 +1728,26 @@ async def get_iam_policy( r"""Gets the IAM Policy for a resource (namespace or service only). + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): The request object. Request message for `GetIamPolicy` @@ -1553,6 +1854,26 @@ async def set_iam_policy( r"""Sets the IAM Policy for a resource (namespace or service only). + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): The request object. Request message for `SetIamPolicy` @@ -1659,6 +1980,27 @@ async def test_iam_permissions( r"""Tests IAM permissions for a resource (namespace or service only). + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): The request object. Request message for diff --git a/google/cloud/servicedirectory_v1/services/registration_service/client.py b/google/cloud/servicedirectory_v1/services/registration_service/client.py index 9677a2e1..65e7134b 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/client.py @@ -476,6 +476,27 @@ def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new Namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_create_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = client.create_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.CreateNamespaceRequest, dict]): The request object. The request message for @@ -574,6 +595,27 @@ def list_namespaces( ) -> pagers.ListNamespacesPager: r"""Lists all namespaces. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.ListNamespacesRequest, dict]): The request object. The request message for @@ -655,6 +697,26 @@ def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.GetNamespaceRequest, dict]): The request object. The request message for @@ -729,6 +791,25 @@ def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_update_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateNamespaceRequest( + ) + + # Make the request + response = client.update_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.UpdateNamespaceRequest, dict]): The request object. The request message for @@ -812,6 +893,24 @@ def delete_namespace( r"""Deletes a namespace. This also deletes all services and endpoints in the namespace. + + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + client.delete_namespace(request=request) + Args: request (Union[google.cloud.servicedirectory_v1.types.DeleteNamespaceRequest, dict]): The request object. The request message for @@ -878,6 +977,27 @@ def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new Service. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_create_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = client.create_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.CreateServiceRequest, dict]): The request object. The request message for @@ -975,6 +1095,27 @@ def list_services( ) -> pagers.ListServicesPager: r"""Lists all services belonging to a namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_list_services(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.ListServicesRequest, dict]): The request object. The request message for @@ -1056,6 +1197,26 @@ def get_service( ) -> service.Service: r"""Gets a service. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.GetServiceRequest, dict]): The request object. The request message for @@ -1133,6 +1294,25 @@ def update_service( ) -> gcs_service.Service: r"""Updates a service. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_update_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateServiceRequest( + ) + + # Make the request + response = client.update_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.UpdateServiceRequest, dict]): The request object. The request message for @@ -1216,6 +1396,24 @@ def delete_service( r"""Deletes a service. This also deletes all endpoints associated with the service. + + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_delete_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + client.delete_service(request=request) + Args: request (Union[google.cloud.servicedirectory_v1.types.DeleteServiceRequest, dict]): The request object. The request message for @@ -1282,6 +1480,27 @@ def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates a endpoint, and returns the new Endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = client.create_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.CreateEndpointRequest, dict]): The request object. The request message for @@ -1378,6 +1597,27 @@ def list_endpoints( ) -> pagers.ListEndpointsPager: r"""Lists all endpoints. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_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) + Args: request (Union[google.cloud.servicedirectory_v1.types.ListEndpointsRequest, dict]): The request object. The request message for @@ -1459,6 +1699,26 @@ def get_endpoint( ) -> endpoint.Endpoint: r"""Gets a endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.GetEndpointRequest, dict]): The request object. The request message for @@ -1534,6 +1794,25 @@ def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates a endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateEndpointRequest( + ) + + # Make the request + response = client.update_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1.types.UpdateEndpointRequest, dict]): The request object. The request message for @@ -1615,6 +1894,23 @@ def delete_endpoint( ) -> None: r"""Deletes a endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + client.delete_endpoint(request=request) + Args: request (Union[google.cloud.servicedirectory_v1.types.DeleteEndpointRequest, dict]): The request object. The request message for @@ -1679,6 +1975,27 @@ def get_iam_policy( r"""Gets the IAM Policy for a resource (namespace or service only). + + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): The request object. Request message for `GetIamPolicy` @@ -1784,6 +2101,27 @@ def set_iam_policy( r"""Sets the IAM Policy for a resource (namespace or service only). + + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): The request object. Request message for `SetIamPolicy` @@ -1889,6 +2227,28 @@ def test_iam_permissions( r"""Tests IAM permissions for a resource (namespace or service only). + + + .. code-block:: + + from google.cloud import servicedirectory_v1 + + def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): The request object. Request message for diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py index 418efa1c..89c005f1 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py @@ -219,6 +219,26 @@ async def resolve_service( associated endpoints. Resolving a service is not considered an active developer method. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_resolve_service(): + # Create a client + client = servicedirectory_v1beta1.LookupServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = client.resolve_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ResolveServiceRequest, dict]): The request object. The request message for diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py index 138d6888..82c32c5f 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py @@ -448,6 +448,27 @@ def resolve_service( associated endpoints. Resolving a service is not considered an active developer method. + + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_resolve_service(): + # Create a client + client = servicedirectory_v1beta1.LookupServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = client.resolve_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ResolveServiceRequest, dict]): The request object. The request message for diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py index 8849b038..da15a06b 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py @@ -248,6 +248,26 @@ async def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_create_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = client.create_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.CreateNamespaceRequest, dict]): The request object. The request message for @@ -346,6 +366,26 @@ async def list_namespaces( ) -> pagers.ListNamespacesAsyncPager: r"""Lists all namespaces. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ListNamespacesRequest, dict]): The request object. The request message for @@ -427,6 +467,25 @@ async def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.GetNamespaceRequest, dict]): The request object. The request message for @@ -501,6 +560,24 @@ async def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_update_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateNamespaceRequest( + ) + + # Make the request + response = client.update_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.UpdateNamespaceRequest, dict]): The request object. The request message for @@ -584,6 +661,23 @@ async def delete_namespace( r"""Deletes a namespace. This also deletes all services and endpoints in the namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + client.delete_namespace(request=request) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.DeleteNamespaceRequest, dict]): The request object. The request message for @@ -650,6 +744,26 @@ async def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new service. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_create_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = client.create_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.CreateServiceRequest, dict]): The request object. The request message for @@ -747,6 +861,26 @@ async def list_services( ) -> pagers.ListServicesAsyncPager: r"""Lists all services belonging to a namespace. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_list_services(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ListServicesRequest, dict]): The request object. The request message for @@ -828,6 +962,25 @@ async def get_service( ) -> service.Service: r"""Gets a service. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.GetServiceRequest, dict]): The request object. The request message for @@ -905,6 +1058,24 @@ async def update_service( ) -> gcs_service.Service: r"""Updates a service. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_update_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateServiceRequest( + ) + + # Make the request + response = client.update_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.UpdateServiceRequest, dict]): The request object. The request message for @@ -988,6 +1159,23 @@ async def delete_service( r"""Deletes a service. This also deletes all endpoints associated with the service. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_delete_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + client.delete_service(request=request) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.DeleteServiceRequest, dict]): The request object. The request message for @@ -1054,6 +1242,26 @@ async def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates an endpoint, and returns the new endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = client.create_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.CreateEndpointRequest, dict]): The request object. The request message for @@ -1150,6 +1358,26 @@ async def list_endpoints( ) -> pagers.ListEndpointsAsyncPager: r"""Lists all endpoints. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListEndpointsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_endpoints(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ListEndpointsRequest, dict]): The request object. The request message for @@ -1231,6 +1459,25 @@ async def get_endpoint( ) -> endpoint.Endpoint: r"""Gets an endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.GetEndpointRequest, dict]): The request object. The request message for @@ -1306,6 +1553,24 @@ async def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates an endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateEndpointRequest( + ) + + # Make the request + response = client.update_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.UpdateEndpointRequest, dict]): The request object. The request message for @@ -1387,6 +1652,22 @@ async def delete_endpoint( ) -> None: r"""Deletes an endpoint. + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + client.delete_endpoint(request=request) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.DeleteEndpointRequest, dict]): The request object. The request message for @@ -1451,6 +1732,26 @@ async def get_iam_policy( r"""Gets the IAM Policy for a resource (namespace or service only). + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): The request object. Request message for `GetIamPolicy` @@ -1557,6 +1858,26 @@ async def set_iam_policy( r"""Sets the IAM Policy for a resource (namespace or service only). + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): The request object. Request message for `SetIamPolicy` @@ -1663,6 +1984,27 @@ async def test_iam_permissions( r"""Tests IAM permissions for a resource (namespace or service only). + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): The request object. Request message for diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py index b1faf7b3..bf691931 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py @@ -494,6 +494,27 @@ def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_create_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = client.create_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.CreateNamespaceRequest, dict]): The request object. The request message for @@ -592,6 +613,27 @@ def list_namespaces( ) -> pagers.ListNamespacesPager: r"""Lists all namespaces. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ListNamespacesRequest, dict]): The request object. The request message for @@ -673,6 +715,26 @@ def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.GetNamespaceRequest, dict]): The request object. The request message for @@ -747,6 +809,25 @@ def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_update_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateNamespaceRequest( + ) + + # Make the request + response = client.update_namespace(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.UpdateNamespaceRequest, dict]): The request object. The request message for @@ -830,6 +911,24 @@ def delete_namespace( r"""Deletes a namespace. This also deletes all services and endpoints in the namespace. + + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + client.delete_namespace(request=request) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.DeleteNamespaceRequest, dict]): The request object. The request message for @@ -896,6 +995,27 @@ def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new service. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_create_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = client.create_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.CreateServiceRequest, dict]): The request object. The request message for @@ -993,6 +1113,27 @@ def list_services( ) -> pagers.ListServicesPager: r"""Lists all services belonging to a namespace. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_list_services(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ListServicesRequest, dict]): The request object. The request message for @@ -1074,6 +1215,26 @@ def get_service( ) -> service.Service: r"""Gets a service. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.GetServiceRequest, dict]): The request object. The request message for @@ -1151,6 +1312,25 @@ def update_service( ) -> gcs_service.Service: r"""Updates a service. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_update_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateServiceRequest( + ) + + # Make the request + response = client.update_service(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.UpdateServiceRequest, dict]): The request object. The request message for @@ -1234,6 +1414,24 @@ def delete_service( r"""Deletes a service. This also deletes all endpoints associated with the service. + + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_delete_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + client.delete_service(request=request) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.DeleteServiceRequest, dict]): The request object. The request message for @@ -1300,6 +1498,27 @@ def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates an endpoint, and returns the new endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = client.create_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.CreateEndpointRequest, dict]): The request object. The request message for @@ -1396,6 +1615,27 @@ def list_endpoints( ) -> pagers.ListEndpointsPager: r"""Lists all endpoints. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListEndpointsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_endpoints(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.ListEndpointsRequest, dict]): The request object. The request message for @@ -1477,6 +1717,26 @@ def get_endpoint( ) -> endpoint.Endpoint: r"""Gets an endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.GetEndpointRequest, dict]): The request object. The request message for @@ -1552,6 +1812,25 @@ def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates an endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateEndpointRequest( + ) + + # Make the request + response = client.update_endpoint(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.UpdateEndpointRequest, dict]): The request object. The request message for @@ -1633,6 +1912,23 @@ def delete_endpoint( ) -> None: r"""Deletes an endpoint. + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + client.delete_endpoint(request=request) + Args: request (Union[google.cloud.servicedirectory_v1beta1.types.DeleteEndpointRequest, dict]): The request object. The request message for @@ -1697,6 +1993,27 @@ def get_iam_policy( r"""Gets the IAM Policy for a resource (namespace or service only). + + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]): The request object. Request message for `GetIamPolicy` @@ -1802,6 +2119,27 @@ def set_iam_policy( r"""Sets the IAM Policy for a resource (namespace or service only). + + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]): The request object. Request message for `SetIamPolicy` @@ -1907,6 +2245,28 @@ def test_iam_permissions( r"""Tests IAM permissions for a resource (namespace or service only). + + + .. code-block:: + + from google.cloud import servicedirectory_v1beta1 + + def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + Args: request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]): The request object. Request message for diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py new file mode 100644 index 00000000..8132dfb8 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResolveService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_async] +from google.cloud import servicedirectory_v1 + + +async def sample_resolve_service(): + # Create a client + client = servicedirectory_v1.LookupServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = await client.resolve_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py new file mode 100644 index 00000000..e32bc024 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResolveService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_sync] +from google.cloud import servicedirectory_v1 + + +def sample_resolve_service(): + # Create a client + client = servicedirectory_v1.LookupServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = client.resolve_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py new file mode 100644 index 00000000..79476414 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_async] +from google.cloud import servicedirectory_v1 + + +async def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = await client.create_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py new file mode 100644 index 00000000..bd0169d7 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_sync] +from google.cloud import servicedirectory_v1 + + +def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = client.create_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py new file mode 100644 index 00000000..41ceabf6 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_async] +from google.cloud import servicedirectory_v1 + + +async def sample_create_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = await client.create_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py new file mode 100644 index 00000000..035e4393 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_sync] +from google.cloud import servicedirectory_v1 + + +def sample_create_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = client.create_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py new file mode 100644 index 00000000..ce38f366 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_async] +from google.cloud import servicedirectory_v1 + + +async def sample_create_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = await client.create_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py new file mode 100644 index 00000000..25f9b068 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_sync] +from google.cloud import servicedirectory_v1 + + +def sample_create_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = client.create_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py new file mode 100644 index 00000000..b3dfebc7 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_async] +from google.cloud import servicedirectory_v1 + + +async def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + await client.delete_endpoint(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py new file mode 100644 index 00000000..095bdddf --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_sync] +from google.cloud import servicedirectory_v1 + + +def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + client.delete_endpoint(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py new file mode 100644 index 00000000..913ccb4e --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_async] +from google.cloud import servicedirectory_v1 + + +async def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + await client.delete_namespace(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py new file mode 100644 index 00000000..4419ac16 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_sync] +from google.cloud import servicedirectory_v1 + + +def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + client.delete_namespace(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py new file mode 100644 index 00000000..404881cd --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_async] +from google.cloud import servicedirectory_v1 + + +async def sample_delete_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + await client.delete_service(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py new file mode 100644 index 00000000..1ed5adf0 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_sync] +from google.cloud import servicedirectory_v1 + + +def sample_delete_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + client.delete_service(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py new file mode 100644 index 00000000..d23dd20f --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_async] +from google.cloud import servicedirectory_v1 + + +async def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = await client.get_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py new file mode 100644 index 00000000..78531acf --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_sync] +from google.cloud import servicedirectory_v1 + + +def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py new file mode 100644 index 00000000..d606cf2f --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_async] +from google.cloud import servicedirectory_v1 + + +async def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py new file mode 100644 index 00000000..f69540ae --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_sync] +from google.cloud import servicedirectory_v1 + + +def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py new file mode 100644 index 00000000..4f3d3bae --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_async] +from google.cloud import servicedirectory_v1 + + +async def sample_get_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py new file mode 100644 index 00000000..fa5d9aa0 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_sync] +from google.cloud import servicedirectory_v1 + + +def sample_get_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py new file mode 100644 index 00000000..2d35dbd6 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_async] +from google.cloud import servicedirectory_v1 + + +async def sample_get_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py new file mode 100644 index 00000000..8c6ae9dd --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_sync] +from google.cloud import servicedirectory_v1 + + +def sample_get_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py new file mode 100644 index 00000000..8f9707be --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_async] +from google.cloud import servicedirectory_v1 + + +async def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_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 servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py new file mode 100644 index 00000000..a1260f2e --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_sync] +from google.cloud import servicedirectory_v1 + + +def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_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 servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py new file mode 100644 index 00000000..4c3d8a9b --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNamespaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_async] +from google.cloud import servicedirectory_v1 + + +async def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py new file mode 100644 index 00000000..d2afdf18 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNamespaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_sync] +from google.cloud import servicedirectory_v1 + + +def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py new file mode 100644 index 00000000..7ed05d68 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListServices +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_async] +from google.cloud import servicedirectory_v1 + + +async def sample_list_services(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py new file mode 100644 index 00000000..1bb9dbd7 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListServices +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_sync] +from google.cloud import servicedirectory_v1 + + +def sample_list_services(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py new file mode 100644 index 00000000..1a2087a2 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_async] +from google.cloud import servicedirectory_v1 + + +async def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py new file mode 100644 index 00000000..8e171d0b --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_sync] +from google.cloud import servicedirectory_v1 + + +def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py new file mode 100644 index 00000000..723039ca --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_async] +from google.cloud import servicedirectory_v1 + + +async def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py new file mode 100644 index 00000000..14fa577f --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_sync] +from google.cloud import servicedirectory_v1 + + +def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py new file mode 100644 index 00000000..bf682d25 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_async] +from google.cloud import servicedirectory_v1 + + +async def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateEndpointRequest( + ) + + # Make the request + response = await client.update_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py new file mode 100644 index 00000000..e03ad67e --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_sync] +from google.cloud import servicedirectory_v1 + + +def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateEndpointRequest( + ) + + # Make the request + response = client.update_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py new file mode 100644 index 00000000..75e6799c --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_async] +from google.cloud import servicedirectory_v1 + + +async def sample_update_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateNamespaceRequest( + ) + + # Make the request + response = await client.update_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py new file mode 100644 index 00000000..12c31025 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_sync] +from google.cloud import servicedirectory_v1 + + +def sample_update_namespace(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateNamespaceRequest( + ) + + # Make the request + response = client.update_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py new file mode 100644 index 00000000..0309a0bd --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_async] +from google.cloud import servicedirectory_v1 + + +async def sample_update_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateServiceRequest( + ) + + # Make the request + response = await client.update_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py new file mode 100644 index 00000000..e2f21f81 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_sync] +from google.cloud import servicedirectory_v1 + + +def sample_update_service(): + # Create a client + client = servicedirectory_v1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1.UpdateServiceRequest( + ) + + # Make the request + response = client.update_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py new file mode 100644 index 00000000..2479832e --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResolveService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_resolve_service(): + # Create a client + client = servicedirectory_v1beta1.LookupServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = await client.resolve_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py new file mode 100644 index 00000000..46af263b --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ResolveService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_resolve_service(): + # Create a client + client = servicedirectory_v1beta1.LookupServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ResolveServiceRequest( + name="name_value", + ) + + # Make the request + response = client.resolve_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py new file mode 100644 index 00000000..191f5327 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = await client.create_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py new file mode 100644 index 00000000..78275d15 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_create_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateEndpointRequest( + parent="parent_value", + endpoint_id="endpoint_id_value", + ) + + # Make the request + response = client.create_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py new file mode 100644 index 00000000..60d889d5 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_create_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = await client.create_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py new file mode 100644 index 00000000..39d0ef73 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_create_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateNamespaceRequest( + parent="parent_value", + namespace_id="namespace_id_value", + ) + + # Make the request + response = client.create_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py new file mode 100644 index 00000000..2768b156 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_create_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = await client.create_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py new file mode 100644 index 00000000..ba32f272 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_create_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.CreateServiceRequest( + parent="parent_value", + service_id="service_id_value", + ) + + # Make the request + response = client.create_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py new file mode 100644 index 00000000..1257088a --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + await client.delete_endpoint(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py new file mode 100644 index 00000000..ef883b01 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_delete_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteEndpointRequest( + name="name_value", + ) + + # Make the request + client.delete_endpoint(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py new file mode 100644 index 00000000..15f67759 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + await client.delete_namespace(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py new file mode 100644 index 00000000..dfaa3690 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_delete_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteNamespaceRequest( + name="name_value", + ) + + # Make the request + client.delete_namespace(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py new file mode 100644 index 00000000..0df9503d --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_delete_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + await client.delete_service(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py new file mode 100644 index 00000000..86511efe --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_delete_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.DeleteServiceRequest( + name="name_value", + ) + + # Make the request + client.delete_service(request=request) + + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py new file mode 100644 index 00000000..fa3e9a8c --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = await client.get_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py new file mode 100644 index 00000000..092f154a --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_get_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetEndpointRequest( + name="name_value", + ) + + # Make the request + response = client.get_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py new file mode 100644 index 00000000..aeaaef21 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py new file mode 100644 index 00000000..69d14810 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_get_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py new file mode 100644 index 00000000..0c597c11 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_get_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py new file mode 100644 index 00000000..fbdad3d2 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_get_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetNamespaceRequest( + name="name_value", + ) + + # Make the request + response = client.get_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py new file mode 100644 index 00000000..0251cf35 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_get_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = await client.get_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py new file mode 100644 index 00000000..5a5251f1 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_get_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.GetServiceRequest( + name="name_value", + ) + + # Make the request + response = client.get_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py new file mode 100644 index 00000000..5d0dac27 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.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 servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py new file mode 100644 index 00000000..9a5bdda8 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_list_endpoints(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.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 servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py new file mode 100644 index 00000000..3d3968d8 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNamespaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py new file mode 100644 index 00000000..4b72373d --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListNamespaces +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_list_namespaces(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListNamespacesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_namespaces(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py new file mode 100644 index 00000000..17b403da --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListServices +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_list_services(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py new file mode 100644 index 00000000..0e84fe78 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListServices +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_list_services(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.ListServicesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_services(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py new file mode 100644 index 00000000..6804d4c7 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py new file mode 100644 index 00000000..56f8ae57 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_set_iam_policy(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py new file mode 100644 index 00000000..d095eb2c --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py new file mode 100644 index 00000000..b1a9d0ad --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for 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-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_test_iam_permissions(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value_1', 'permissions_value_2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py new file mode 100644 index 00000000..b849bea3 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateEndpointRequest( + ) + + # Make the request + response = await client.update_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py new file mode 100644 index 00000000..aa78937a --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateEndpoint +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_update_endpoint(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateEndpointRequest( + ) + + # Make the request + response = client.update_endpoint(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py new file mode 100644 index 00000000..56c18a5e --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_update_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateNamespaceRequest( + ) + + # Make the request + response = await client.update_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py new file mode 100644 index 00000000..3d6b6868 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateNamespace +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_update_namespace(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateNamespaceRequest( + ) + + # Make the request + response = client.update_namespace(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py new file mode 100644 index 00000000..b44067cf --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_async] +from google.cloud import servicedirectory_v1beta1 + + +async def sample_update_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceAsyncClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateServiceRequest( + ) + + # Make the request + response = await client.update_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py new file mode 100644 index 00000000..b3f7c8f5 --- /dev/null +++ b/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateService +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-service-directory + + +# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_sync] +from google.cloud import servicedirectory_v1beta1 + + +def sample_update_service(): + # Create a client + client = servicedirectory_v1beta1.RegistrationServiceClient() + + # Initialize request argument(s) + request = servicedirectory_v1beta1.UpdateServiceRequest( + ) + + # Make the request + response = client.update_service(request=request) + + # Handle the response + print(response) + +# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_sync] diff --git a/samples/generated_samples/snippet_metadata_servicedirectory_v1.json b/samples/generated_samples/snippet_metadata_servicedirectory_v1.json new file mode 100644 index 00000000..e1d96de1 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_servicedirectory_v1.json @@ -0,0 +1,1683 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "LookupService" + }, + "shortName": "ResolveService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "LookupService" + }, + "shortName": "ResolveService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListEndpoints" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListEndpoints" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListNamespaces" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListNamespaces" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListServices" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListServices" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "SetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "SetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "TestIamPermissions" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "TestIamPermissions" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json b/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json new file mode 100644 index 00000000..6923e019 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json @@ -0,0 +1,1683 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "LookupService" + }, + "shortName": "ResolveService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "LookupService" + }, + "shortName": "ResolveService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "CreateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "DeleteService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "GetService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListEndpoints" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListEndpoints" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListNamespaces" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListNamespaces" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListServices" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "ListServices" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "SetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "SetIamPolicy" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "TestIamPermissions" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "TestIamPermissions" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateEndpoint" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateNamespace" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "RegistrationService" + }, + "shortName": "UpdateService" + } + }, + "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py", + "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} From caa55d799afdb24f74d977e63964e8d558e16ef1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 09:29:30 -0700 Subject: [PATCH 12/14] chore: use gapic-generator-python 0.63.4 (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.63.4 chore: fix snippet region tag format chore: fix docstring code block formatting PiperOrigin-RevId: 430730865 Source-Link: https://github.com/googleapis/googleapis/commit/ea5800229f73f94fd7204915a86ed09dcddf429a Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca893ff8af25fc7fe001de1405a517d80446ecca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E4OTNmZjhhZjI1ZmM3ZmUwMDFkZTE0MDVhNTE3ZDgwNDQ2ZWNjYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: delete duplicates Co-authored-by: Owl Bot Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> --- .../services/lookup_service/async_client.py | 2 +- .../services/lookup_service/client.py | 3 +- .../registration_service/async_client.py | 36 ++--- .../services/registration_service/client.py | 54 +++---- .../services/lookup_service/async_client.py | 2 +- .../services/lookup_service/client.py | 3 +- .../registration_service/async_client.py | 36 ++--- .../services/registration_service/client.py | 54 +++---- ...d_lookup_service_resolve_service_async.py} | 4 +- ...ed_lookup_service_resolve_service_sync.py} | 4 +- ...stration_service_create_endpoint_async.py} | 4 +- ...istration_service_create_endpoint_sync.py} | 4 +- ...tration_service_create_namespace_async.py} | 4 +- ...stration_service_create_namespace_sync.py} | 4 +- ...istration_service_create_service_async.py} | 4 +- ...gistration_service_create_service_sync.py} | 4 +- ...stration_service_delete_endpoint_async.py} | 4 +- ...istration_service_delete_endpoint_sync.py} | 4 +- ...tration_service_delete_namespace_async.py} | 4 +- ...stration_service_delete_namespace_sync.py} | 4 +- ...istration_service_delete_service_async.py} | 4 +- ...gistration_service_delete_service_sync.py} | 4 +- ...egistration_service_get_endpoint_async.py} | 4 +- ...registration_service_get_endpoint_sync.py} | 4 +- ...istration_service_get_iam_policy_async.py} | 4 +- ...gistration_service_get_iam_policy_sync.py} | 4 +- ...gistration_service_get_namespace_async.py} | 4 +- ...egistration_service_get_namespace_sync.py} | 4 +- ...registration_service_get_service_async.py} | 4 +- ..._registration_service_get_service_sync.py} | 4 +- ...istration_service_list_endpoints_async.py} | 4 +- ...gistration_service_list_endpoints_sync.py} | 4 +- ...stration_service_list_namespaces_async.py} | 4 +- ...istration_service_list_namespaces_sync.py} | 4 +- ...gistration_service_list_services_async.py} | 4 +- ...egistration_service_list_services_sync.py} | 4 +- ...istration_service_set_iam_policy_async.py} | 4 +- ...gistration_service_set_iam_policy_sync.py} | 4 +- ...ion_service_test_iam_permissions_async.py} | 4 +- ...tion_service_test_iam_permissions_sync.py} | 4 +- ...stration_service_update_endpoint_async.py} | 4 +- ...istration_service_update_endpoint_sync.py} | 4 +- ...tration_service_update_namespace_async.py} | 4 +- ...stration_service_update_namespace_sync.py} | 4 +- ...istration_service_update_service_async.py} | 4 +- ...gistration_service_update_service_sync.py} | 4 +- ...d_lookup_service_resolve_service_async.py} | 4 +- ...ed_lookup_service_resolve_service_sync.py} | 4 +- ...stration_service_create_endpoint_async.py} | 4 +- ...istration_service_create_endpoint_sync.py} | 4 +- ...tration_service_create_namespace_async.py} | 4 +- ...stration_service_create_namespace_sync.py} | 4 +- ...istration_service_create_service_async.py} | 4 +- ...gistration_service_create_service_sync.py} | 4 +- ...stration_service_delete_endpoint_async.py} | 4 +- ...istration_service_delete_endpoint_sync.py} | 4 +- ...tration_service_delete_namespace_async.py} | 4 +- ...stration_service_delete_namespace_sync.py} | 4 +- ...istration_service_delete_service_async.py} | 4 +- ...gistration_service_delete_service_sync.py} | 4 +- ...egistration_service_get_endpoint_async.py} | 4 +- ...registration_service_get_endpoint_sync.py} | 4 +- ...istration_service_get_iam_policy_async.py} | 4 +- ...gistration_service_get_iam_policy_sync.py} | 4 +- ...gistration_service_get_namespace_async.py} | 4 +- ...egistration_service_get_namespace_sync.py} | 4 +- ...registration_service_get_service_async.py} | 4 +- ..._registration_service_get_service_sync.py} | 4 +- ...istration_service_list_endpoints_async.py} | 4 +- ...gistration_service_list_endpoints_sync.py} | 4 +- ...stration_service_list_namespaces_async.py} | 4 +- ...istration_service_list_namespaces_sync.py} | 4 +- ...gistration_service_list_services_async.py} | 4 +- ...egistration_service_list_services_sync.py} | 4 +- ...istration_service_set_iam_policy_async.py} | 4 +- ...gistration_service_set_iam_policy_sync.py} | 4 +- ...ion_service_test_iam_permissions_async.py} | 4 +- ...tion_service_test_iam_permissions_sync.py} | 4 +- ...stration_service_update_endpoint_async.py} | 4 +- ...istration_service_update_endpoint_sync.py} | 4 +- ...tration_service_update_namespace_async.py} | 4 +- ...stration_service_update_namespace_sync.py} | 4 +- ...istration_service_update_service_async.py} | 4 +- ...gistration_service_update_service_sync.py} | 4 +- .../snippet_metadata_servicedirectory_v1.json | 152 +++++++++--------- ...pet_metadata_servicedirectory_v1beta1.json | 152 +++++++++--------- 86 files changed, 380 insertions(+), 418 deletions(-) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py => servicedirectory_v1_generated_lookup_service_resolve_service_async.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py => servicedirectory_v1_generated_lookup_service_resolve_service_sync.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py => servicedirectory_v1_generated_registration_service_create_endpoint_async.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py => servicedirectory_v1_generated_registration_service_create_endpoint_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py => servicedirectory_v1_generated_registration_service_create_namespace_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py => servicedirectory_v1_generated_registration_service_create_namespace_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py => servicedirectory_v1_generated_registration_service_create_service_async.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py => servicedirectory_v1_generated_registration_service_create_service_sync.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py => servicedirectory_v1_generated_registration_service_delete_endpoint_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py => servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py => servicedirectory_v1_generated_registration_service_delete_namespace_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py => servicedirectory_v1_generated_registration_service_delete_namespace_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py => servicedirectory_v1_generated_registration_service_delete_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py => servicedirectory_v1_generated_registration_service_delete_service_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py => servicedirectory_v1_generated_registration_service_get_endpoint_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py => servicedirectory_v1_generated_registration_service_get_endpoint_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py => servicedirectory_v1_generated_registration_service_get_iam_policy_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py => servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py => servicedirectory_v1_generated_registration_service_get_namespace_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py => servicedirectory_v1_generated_registration_service_get_namespace_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py => servicedirectory_v1_generated_registration_service_get_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py => servicedirectory_v1_generated_registration_service_get_service_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py => servicedirectory_v1_generated_registration_service_list_endpoints_async.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py => servicedirectory_v1_generated_registration_service_list_endpoints_sync.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py => servicedirectory_v1_generated_registration_service_list_namespaces_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py => servicedirectory_v1_generated_registration_service_list_namespaces_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py => servicedirectory_v1_generated_registration_service_list_services_async.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py => servicedirectory_v1_generated_registration_service_list_services_sync.py} (88%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py => servicedirectory_v1_generated_registration_service_set_iam_policy_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py => servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py => servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py => servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py => servicedirectory_v1_generated_registration_service_update_endpoint_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py => servicedirectory_v1_generated_registration_service_update_endpoint_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py => servicedirectory_v1_generated_registration_service_update_namespace_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py => servicedirectory_v1_generated_registration_service_update_namespace_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py => servicedirectory_v1_generated_registration_service_update_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py => servicedirectory_v1_generated_registration_service_update_service_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py => servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py => servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py => servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py => servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py => servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py => servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py => servicedirectory_v1beta1_generated_registration_service_create_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py => servicedirectory_v1beta1_generated_registration_service_create_service_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py => servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py => servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py => servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py => servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py => servicedirectory_v1beta1_generated_registration_service_delete_service_async.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py => servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py => servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py => servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py => servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py => servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py => servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py => servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py => servicedirectory_v1beta1_generated_registration_service_get_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py => servicedirectory_v1beta1_generated_registration_service_get_service_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py => servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py => servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py => servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py => servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py => servicedirectory_v1beta1_generated_registration_service_list_services_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py => servicedirectory_v1beta1_generated_registration_service_list_services_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py => servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py => servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py => servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py => servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py => servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py => servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py => servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py => servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py} (86%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py => servicedirectory_v1beta1_generated_registration_service_update_service_async.py} (87%) rename samples/generated_samples/{servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py => servicedirectory_v1beta1_generated_registration_service_update_service_sync.py} (87%) diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py index c93fcc52..f1b9c393 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py @@ -217,7 +217,7 @@ async def resolve_service( considered an active developer method. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1/services/lookup_service/client.py index ad95f69a..c056a37c 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/client.py @@ -432,8 +432,7 @@ def resolve_service( considered an active developer method. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 diff --git a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py index 7f5fd6de..61b97c5c 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py @@ -244,7 +244,7 @@ async def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new Namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -362,7 +362,7 @@ async def list_namespaces( ) -> pagers.ListNamespacesAsyncPager: r"""Lists all namespaces. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -463,7 +463,7 @@ async def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -556,7 +556,7 @@ async def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -658,7 +658,7 @@ async def delete_namespace( and endpoints in the namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -740,7 +740,7 @@ async def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new Service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -857,7 +857,7 @@ async def list_services( ) -> pagers.ListServicesAsyncPager: r"""Lists all services belonging to a namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -958,7 +958,7 @@ async def get_service( ) -> service.Service: r"""Gets a service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1054,7 +1054,7 @@ async def update_service( ) -> gcs_service.Service: r"""Updates a service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1156,7 +1156,7 @@ async def delete_service( associated with the service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1238,7 +1238,7 @@ async def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates a endpoint, and returns the new Endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1354,7 +1354,7 @@ async def list_endpoints( ) -> pagers.ListEndpointsAsyncPager: r"""Lists all endpoints. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1455,7 +1455,7 @@ async def get_endpoint( ) -> endpoint.Endpoint: r"""Gets a endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1549,7 +1549,7 @@ async def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates a endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1648,7 +1648,7 @@ async def delete_endpoint( ) -> None: r"""Deletes a endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1729,7 +1729,7 @@ async def get_iam_policy( service only). - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1855,7 +1855,7 @@ async def set_iam_policy( service only). - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1981,7 +1981,7 @@ async def test_iam_permissions( service only). - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 diff --git a/google/cloud/servicedirectory_v1/services/registration_service/client.py b/google/cloud/servicedirectory_v1/services/registration_service/client.py index 65e7134b..7428de85 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/client.py @@ -476,8 +476,7 @@ def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new Namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -595,8 +594,7 @@ def list_namespaces( ) -> pagers.ListNamespacesPager: r"""Lists all namespaces. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -697,8 +695,7 @@ def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -791,8 +788,7 @@ def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -894,8 +890,7 @@ def delete_namespace( and endpoints in the namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -977,8 +972,7 @@ def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new Service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1095,8 +1089,7 @@ def list_services( ) -> pagers.ListServicesPager: r"""Lists all services belonging to a namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1197,8 +1190,7 @@ def get_service( ) -> service.Service: r"""Gets a service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1294,8 +1286,7 @@ def update_service( ) -> gcs_service.Service: r"""Updates a service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1397,8 +1388,7 @@ def delete_service( associated with the service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1480,8 +1470,7 @@ def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates a endpoint, and returns the new Endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1597,8 +1586,7 @@ def list_endpoints( ) -> pagers.ListEndpointsPager: r"""Lists all endpoints. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1699,8 +1687,7 @@ def get_endpoint( ) -> endpoint.Endpoint: r"""Gets a endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1794,8 +1781,7 @@ def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates a endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1894,8 +1880,7 @@ def delete_endpoint( ) -> None: r"""Deletes a endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -1976,8 +1961,7 @@ def get_iam_policy( service only). - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -2102,8 +2086,7 @@ def set_iam_policy( service only). - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 @@ -2228,8 +2211,7 @@ def test_iam_permissions( service only). - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1 diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py index 89c005f1..2c8eefbf 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py @@ -220,7 +220,7 @@ async def resolve_service( active developer method. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py index 82c32c5f..bcd62dd8 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py @@ -449,8 +449,7 @@ def resolve_service( active developer method. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py index da15a06b..3a5d2d86 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py @@ -248,7 +248,7 @@ async def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -366,7 +366,7 @@ async def list_namespaces( ) -> pagers.ListNamespacesAsyncPager: r"""Lists all namespaces. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -467,7 +467,7 @@ async def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -560,7 +560,7 @@ async def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -662,7 +662,7 @@ async def delete_namespace( and endpoints in the namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -744,7 +744,7 @@ async def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -861,7 +861,7 @@ async def list_services( ) -> pagers.ListServicesAsyncPager: r"""Lists all services belonging to a namespace. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -962,7 +962,7 @@ async def get_service( ) -> service.Service: r"""Gets a service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1058,7 +1058,7 @@ async def update_service( ) -> gcs_service.Service: r"""Updates a service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1160,7 +1160,7 @@ async def delete_service( associated with the service. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1242,7 +1242,7 @@ async def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates an endpoint, and returns the new endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1358,7 +1358,7 @@ async def list_endpoints( ) -> pagers.ListEndpointsAsyncPager: r"""Lists all endpoints. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1459,7 +1459,7 @@ async def get_endpoint( ) -> endpoint.Endpoint: r"""Gets an endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1553,7 +1553,7 @@ async def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates an endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1652,7 +1652,7 @@ async def delete_endpoint( ) -> None: r"""Deletes an endpoint. - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1733,7 +1733,7 @@ async def get_iam_policy( service only). - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1859,7 +1859,7 @@ async def set_iam_policy( service only). - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1985,7 +1985,7 @@ async def test_iam_permissions( service only). - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py index bf691931..dd0b1584 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py @@ -494,8 +494,7 @@ def create_namespace( ) -> gcs_namespace.Namespace: r"""Creates a namespace, and returns the new namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -613,8 +612,7 @@ def list_namespaces( ) -> pagers.ListNamespacesPager: r"""Lists all namespaces. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -715,8 +713,7 @@ def get_namespace( ) -> namespace.Namespace: r"""Gets a namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -809,8 +806,7 @@ def update_namespace( ) -> gcs_namespace.Namespace: r"""Updates a namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -912,8 +908,7 @@ def delete_namespace( and endpoints in the namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -995,8 +990,7 @@ def create_service( ) -> gcs_service.Service: r"""Creates a service, and returns the new service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1113,8 +1107,7 @@ def list_services( ) -> pagers.ListServicesPager: r"""Lists all services belonging to a namespace. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1215,8 +1208,7 @@ def get_service( ) -> service.Service: r"""Gets a service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1312,8 +1304,7 @@ def update_service( ) -> gcs_service.Service: r"""Updates a service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1415,8 +1406,7 @@ def delete_service( associated with the service. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1498,8 +1488,7 @@ def create_endpoint( ) -> gcs_endpoint.Endpoint: r"""Creates an endpoint, and returns the new endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1615,8 +1604,7 @@ def list_endpoints( ) -> pagers.ListEndpointsPager: r"""Lists all endpoints. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1717,8 +1705,7 @@ def get_endpoint( ) -> endpoint.Endpoint: r"""Gets an endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1812,8 +1799,7 @@ def update_endpoint( ) -> gcs_endpoint.Endpoint: r"""Updates an endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1912,8 +1898,7 @@ def delete_endpoint( ) -> None: r"""Deletes an endpoint. - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -1994,8 +1979,7 @@ def get_iam_policy( service only). - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -2120,8 +2104,7 @@ def set_iam_policy( service only). - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 @@ -2246,8 +2229,7 @@ def test_iam_permissions( service only). - - .. code-block:: + .. code-block:: python from google.cloud import servicedirectory_v1beta1 diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py rename to samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py index 8132dfb8..073ba421 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_async] +# [START servicedirectory_v1_generated_LookupService_ResolveService_async] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ async def sample_resolve_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_async] +# [END servicedirectory_v1_generated_LookupService_ResolveService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py index e32bc024..2d52f30e 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_sync] +# [START servicedirectory_v1_generated_LookupService_ResolveService_sync] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ def sample_resolve_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_sync] +# [END servicedirectory_v1_generated_LookupService_ResolveService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py index 79476414..af2b9815 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_async] +# [START servicedirectory_v1_generated_RegistrationService_CreateEndpoint_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_create_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_async] +# [END servicedirectory_v1_generated_RegistrationService_CreateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py index bd0169d7..5e90f25c 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_sync] +# [START servicedirectory_v1_generated_RegistrationService_CreateEndpoint_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_create_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_sync] +# [END servicedirectory_v1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py index 41ceabf6..2cee0c02 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_async] +# [START servicedirectory_v1_generated_RegistrationService_CreateNamespace_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_create_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_async] +# [END servicedirectory_v1_generated_RegistrationService_CreateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py index 035e4393..02d64364 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_sync] +# [START servicedirectory_v1_generated_RegistrationService_CreateNamespace_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_create_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_sync] +# [END servicedirectory_v1_generated_RegistrationService_CreateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py index ce38f366..52f535d0 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_async] +# [START servicedirectory_v1_generated_RegistrationService_CreateService_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_create_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_async] +# [END servicedirectory_v1_generated_RegistrationService_CreateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py index 25f9b068..d48e0ba8 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_sync] +# [START servicedirectory_v1_generated_RegistrationService_CreateService_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_create_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_sync] +# [END servicedirectory_v1_generated_RegistrationService_CreateService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py index b3dfebc7..aa295bed 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_async] +# [START servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_async] from google.cloud import servicedirectory_v1 @@ -40,4 +40,4 @@ async def sample_delete_endpoint(): await client.delete_endpoint(request=request) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_async] +# [END servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py index 095bdddf..b1bbca88 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_sync] +# [START servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_sync] from google.cloud import servicedirectory_v1 @@ -40,4 +40,4 @@ def sample_delete_endpoint(): client.delete_endpoint(request=request) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_sync] +# [END servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py index 913ccb4e..f29c8acf 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_async] +# [START servicedirectory_v1_generated_RegistrationService_DeleteNamespace_async] from google.cloud import servicedirectory_v1 @@ -40,4 +40,4 @@ async def sample_delete_namespace(): await client.delete_namespace(request=request) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_async] +# [END servicedirectory_v1_generated_RegistrationService_DeleteNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py index 4419ac16..b82419a7 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_sync] +# [START servicedirectory_v1_generated_RegistrationService_DeleteNamespace_sync] from google.cloud import servicedirectory_v1 @@ -40,4 +40,4 @@ def sample_delete_namespace(): client.delete_namespace(request=request) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_sync] +# [END servicedirectory_v1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py index 404881cd..b658195c 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_async] +# [START servicedirectory_v1_generated_RegistrationService_DeleteService_async] from google.cloud import servicedirectory_v1 @@ -40,4 +40,4 @@ async def sample_delete_service(): await client.delete_service(request=request) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_async] +# [END servicedirectory_v1_generated_RegistrationService_DeleteService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py index 1ed5adf0..abadcd9c 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_sync] +# [START servicedirectory_v1_generated_RegistrationService_DeleteService_sync] from google.cloud import servicedirectory_v1 @@ -40,4 +40,4 @@ def sample_delete_service(): client.delete_service(request=request) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_sync] +# [END servicedirectory_v1_generated_RegistrationService_DeleteService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py index d23dd20f..ab777789 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_async] +# [START servicedirectory_v1_generated_RegistrationService_GetEndpoint_async] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ async def sample_get_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_async] +# [END servicedirectory_v1_generated_RegistrationService_GetEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py index 78531acf..d00826cc 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_sync] +# [START servicedirectory_v1_generated_RegistrationService_GetEndpoint_sync] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ def sample_get_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_sync] +# [END servicedirectory_v1_generated_RegistrationService_GetEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py index d606cf2f..6ed21fc6 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_async] +# [START servicedirectory_v1_generated_RegistrationService_GetIamPolicy_async] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ async def sample_get_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_async] +# [END servicedirectory_v1_generated_RegistrationService_GetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py index f69540ae..db6e766d 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_sync] +# [START servicedirectory_v1_generated_RegistrationService_GetIamPolicy_sync] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ def sample_get_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_sync] +# [END servicedirectory_v1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py index 4f3d3bae..00119fe7 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_async] +# [START servicedirectory_v1_generated_RegistrationService_GetNamespace_async] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ async def sample_get_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_async] +# [END servicedirectory_v1_generated_RegistrationService_GetNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py index fa5d9aa0..dec47bac 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_sync] +# [START servicedirectory_v1_generated_RegistrationService_GetNamespace_sync] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ def sample_get_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_sync] +# [END servicedirectory_v1_generated_RegistrationService_GetNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py index 2d35dbd6..7da4c546 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_async] +# [START servicedirectory_v1_generated_RegistrationService_GetService_async] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ async def sample_get_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_async] +# [END servicedirectory_v1_generated_RegistrationService_GetService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py index 8c6ae9dd..c131ca78 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_sync] +# [START servicedirectory_v1_generated_RegistrationService_GetService_sync] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ def sample_get_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_sync] +# [END servicedirectory_v1_generated_RegistrationService_GetService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py index 8f9707be..46d27202 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_async] +# [START servicedirectory_v1_generated_RegistrationService_ListEndpoints_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_list_endpoints(): async for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_async] +# [END servicedirectory_v1_generated_RegistrationService_ListEndpoints_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py index a1260f2e..08c8480f 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_sync] +# [START servicedirectory_v1_generated_RegistrationService_ListEndpoints_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_list_endpoints(): for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_sync] +# [END servicedirectory_v1_generated_RegistrationService_ListEndpoints_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py index 4c3d8a9b..ce9dde3c 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_async] +# [START servicedirectory_v1_generated_RegistrationService_ListNamespaces_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_list_namespaces(): async for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_async] +# [END servicedirectory_v1_generated_RegistrationService_ListNamespaces_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py index d2afdf18..a756aa4d 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_sync] +# [START servicedirectory_v1_generated_RegistrationService_ListNamespaces_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_list_namespaces(): for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_sync] +# [END servicedirectory_v1_generated_RegistrationService_ListNamespaces_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py index 7ed05d68..36b4ec6e 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_async] +# [START servicedirectory_v1_generated_RegistrationService_ListServices_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_list_services(): async for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_async] +# [END servicedirectory_v1_generated_RegistrationService_ListServices_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py similarity index 88% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py index 1bb9dbd7..cc3709db 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_sync] +# [START servicedirectory_v1_generated_RegistrationService_ListServices_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_list_services(): for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_sync] +# [END servicedirectory_v1_generated_RegistrationService_ListServices_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py index 1a2087a2..809039f9 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_async] +# [START servicedirectory_v1_generated_RegistrationService_SetIamPolicy_async] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ async def sample_set_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_async] +# [END servicedirectory_v1_generated_RegistrationService_SetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py index 8e171d0b..f4a4b85b 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_sync] +# [START servicedirectory_v1_generated_RegistrationService_SetIamPolicy_sync] from google.cloud import servicedirectory_v1 @@ -42,4 +42,4 @@ def sample_set_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_sync] +# [END servicedirectory_v1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py index 723039ca..c47060e6 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_async] +# [START servicedirectory_v1_generated_RegistrationService_TestIamPermissions_async] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ async def sample_test_iam_permissions(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_async] +# [END servicedirectory_v1_generated_RegistrationService_TestIamPermissions_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py index 14fa577f..00a3819b 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_sync] +# [START servicedirectory_v1_generated_RegistrationService_TestIamPermissions_sync] from google.cloud import servicedirectory_v1 @@ -43,4 +43,4 @@ def sample_test_iam_permissions(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_sync] +# [END servicedirectory_v1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py index bf682d25..296dbfb9 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_async] +# [START servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_async] from google.cloud import servicedirectory_v1 @@ -41,4 +41,4 @@ async def sample_update_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_async] +# [END servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py index e03ad67e..2e27ee69 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_sync] +# [START servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_sync] from google.cloud import servicedirectory_v1 @@ -41,4 +41,4 @@ def sample_update_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_sync] +# [END servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py index 75e6799c..5754c298 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_async] +# [START servicedirectory_v1_generated_RegistrationService_UpdateNamespace_async] from google.cloud import servicedirectory_v1 @@ -41,4 +41,4 @@ async def sample_update_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_async] +# [END servicedirectory_v1_generated_RegistrationService_UpdateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py index 12c31025..1c84e729 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_sync] +# [START servicedirectory_v1_generated_RegistrationService_UpdateNamespace_sync] from google.cloud import servicedirectory_v1 @@ -41,4 +41,4 @@ def sample_update_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_sync] +# [END servicedirectory_v1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py index 0309a0bd..a56816a3 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_async] +# [START servicedirectory_v1_generated_RegistrationService_UpdateService_async] from google.cloud import servicedirectory_v1 @@ -41,4 +41,4 @@ async def sample_update_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_async] +# [END servicedirectory_v1_generated_RegistrationService_UpdateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py rename to samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py index e2f21f81..c2e7bbff 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_sync] +# [START servicedirectory_v1_generated_RegistrationService_UpdateService_sync] from google.cloud import servicedirectory_v1 @@ -41,4 +41,4 @@ def sample_update_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_sync] +# [END servicedirectory_v1_generated_RegistrationService_UpdateService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py index 2479832e..13faed0d 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_async] +# [START servicedirectory_v1beta1_generated_LookupService_ResolveService_async] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ async def sample_resolve_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_async] +# [END servicedirectory_v1beta1_generated_LookupService_ResolveService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py index 46af263b..4f6ea8cd 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_sync] +# [START servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ def sample_resolve_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_sync] +# [END servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py index 191f5327..b5bb4830 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_create_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py index 78275d15..b2b09010 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_create_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py index 60d889d5..d47f61de 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_create_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py index 39d0ef73..259ae669 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_create_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py index 2768b156..919819a6 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateService_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_create_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py index ba32f272..36886caa 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_create_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py index 1257088a..bfdacf11 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_async] from google.cloud import servicedirectory_v1beta1 @@ -40,4 +40,4 @@ async def sample_delete_endpoint(): await client.delete_endpoint(request=request) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py index ef883b01..8fdef122 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] from google.cloud import servicedirectory_v1beta1 @@ -40,4 +40,4 @@ def sample_delete_endpoint(): client.delete_endpoint(request=request) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py index 15f67759..97e5b89f 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_async] from google.cloud import servicedirectory_v1beta1 @@ -40,4 +40,4 @@ async def sample_delete_namespace(): await client.delete_namespace(request=request) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py index dfaa3690..6c8ec187 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] from google.cloud import servicedirectory_v1beta1 @@ -40,4 +40,4 @@ def sample_delete_namespace(): client.delete_namespace(request=request) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py index 0df9503d..2a67b60c 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteService_async] from google.cloud import servicedirectory_v1beta1 @@ -40,4 +40,4 @@ async def sample_delete_service(): await client.delete_service(request=request) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py index 86511efe..598e1c06 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] from google.cloud import servicedirectory_v1beta1 @@ -40,4 +40,4 @@ def sample_delete_service(): client.delete_service(request=request) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py index fa3e9a8c..ea39b6ef 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_async] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ async def sample_get_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py index 092f154a..1799c130 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ def sample_get_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py index aeaaef21..ebbb1efb 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_async] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ async def sample_get_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py index 69d14810..a64862b0 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ def sample_get_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py index 0c597c11..72ee02a2 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_async] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ async def sample_get_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py index fbdad3d2..12d5687f 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ def sample_get_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py index 0251cf35..5f180ebc 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetService_async] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ async def sample_get_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py index 5a5251f1..c40e0ab4 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ def sample_get_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py index 5d0dac27..4801b724 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_list_endpoints(): async for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py index 9a5bdda8..07ed71e6 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_list_endpoints(): for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py index 3d3968d8..830ab573 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_list_namespaces(): async for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py index 4b72373d..4d7c89e5 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_list_namespaces(): for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py index 17b403da..fb474d1d 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_ListServices_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_list_services(): async for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_ListServices_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py index 0e84fe78..791497ed 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_list_services(): for response in page_result: print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py index 6804d4c7..dc3a3f35 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_async] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ async def sample_set_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py index 56f8ae57..095a4ab7 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] from google.cloud import servicedirectory_v1beta1 @@ -42,4 +42,4 @@ def sample_set_iam_policy(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py index d095eb2c..ec0fd3ac 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_async] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ async def sample_test_iam_permissions(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py index b1a9d0ad..89c5894f 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] from google.cloud import servicedirectory_v1beta1 @@ -43,4 +43,4 @@ def sample_test_iam_permissions(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py index b849bea3..fb6b79fa 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_async] from google.cloud import servicedirectory_v1beta1 @@ -41,4 +41,4 @@ async def sample_update_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py index aa78937a..f3304f44 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] from google.cloud import servicedirectory_v1beta1 @@ -41,4 +41,4 @@ def sample_update_endpoint(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py index 56c18a5e..930067ec 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_async] from google.cloud import servicedirectory_v1beta1 @@ -41,4 +41,4 @@ async def sample_update_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py similarity index 86% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py index 3d6b6868..d39a4893 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] from google.cloud import servicedirectory_v1beta1 @@ -41,4 +41,4 @@ def sample_update_namespace(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py index b44067cf..619a5a25 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_async] +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateService_async] from google.cloud import servicedirectory_v1beta1 @@ -41,4 +41,4 @@ async def sample_update_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_async] +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateService_async] diff --git a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py similarity index 87% rename from samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py rename to samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py index b3f7c8f5..aab21ad0 100644 --- a/samples/generated_samples/servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-service-directory -# [START servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_sync] +# [START servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] from google.cloud import servicedirectory_v1beta1 @@ -41,4 +41,4 @@ def sample_update_service(): # Handle the response print(response) -# [END servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_sync] +# [END servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] diff --git a/samples/generated_samples/snippet_metadata_servicedirectory_v1.json b/samples/generated_samples/snippet_metadata_servicedirectory_v1.json index e1d96de1..9a851cec 100644 --- a/samples/generated_samples/snippet_metadata_servicedirectory_v1.json +++ b/samples/generated_samples/snippet_metadata_servicedirectory_v1.json @@ -10,8 +10,8 @@ "shortName": "ResolveService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_async", + "file": "servicedirectory_v1_generated_lookup_service_resolve_service_async.py", + "regionTag": "servicedirectory_v1_generated_LookupService_ResolveService_async", "segments": [ { "end": 44, @@ -54,8 +54,8 @@ "shortName": "ResolveService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_lookup_service_resolve_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_LookupService_ResolveService_sync", + "file": "servicedirectory_v1_generated_lookup_service_resolve_service_sync.py", + "regionTag": "servicedirectory_v1_generated_LookupService_ResolveService_sync", "segments": [ { "end": 44, @@ -99,8 +99,8 @@ "shortName": "CreateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_async", + "file": "servicedirectory_v1_generated_registration_service_create_endpoint_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_CreateEndpoint_async", "segments": [ { "end": 45, @@ -143,8 +143,8 @@ "shortName": "CreateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateEndpoint_sync", + "file": "servicedirectory_v1_generated_registration_service_create_endpoint_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_CreateEndpoint_sync", "segments": [ { "end": 45, @@ -188,8 +188,8 @@ "shortName": "CreateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_async", + "file": "servicedirectory_v1_generated_registration_service_create_namespace_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_CreateNamespace_async", "segments": [ { "end": 45, @@ -232,8 +232,8 @@ "shortName": "CreateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateNamespace_sync", + "file": "servicedirectory_v1_generated_registration_service_create_namespace_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_CreateNamespace_sync", "segments": [ { "end": 45, @@ -277,8 +277,8 @@ "shortName": "CreateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_async", + "file": "servicedirectory_v1_generated_registration_service_create_service_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_CreateService_async", "segments": [ { "end": 45, @@ -321,8 +321,8 @@ "shortName": "CreateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_create_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_CreateService_sync", + "file": "servicedirectory_v1_generated_registration_service_create_service_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_CreateService_sync", "segments": [ { "end": 45, @@ -366,8 +366,8 @@ "shortName": "DeleteEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_async", + "file": "servicedirectory_v1_generated_registration_service_delete_endpoint_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_async", "segments": [ { "end": 42, @@ -408,8 +408,8 @@ "shortName": "DeleteEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteEndpoint_sync", + "file": "servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_sync", "segments": [ { "end": 42, @@ -451,8 +451,8 @@ "shortName": "DeleteNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_async", + "file": "servicedirectory_v1_generated_registration_service_delete_namespace_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_DeleteNamespace_async", "segments": [ { "end": 42, @@ -493,8 +493,8 @@ "shortName": "DeleteNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteNamespace_sync", + "file": "servicedirectory_v1_generated_registration_service_delete_namespace_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_DeleteNamespace_sync", "segments": [ { "end": 42, @@ -536,8 +536,8 @@ "shortName": "DeleteService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_async", + "file": "servicedirectory_v1_generated_registration_service_delete_service_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_DeleteService_async", "segments": [ { "end": 42, @@ -578,8 +578,8 @@ "shortName": "DeleteService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_delete_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_DeleteService_sync", + "file": "servicedirectory_v1_generated_registration_service_delete_service_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_DeleteService_sync", "segments": [ { "end": 42, @@ -621,8 +621,8 @@ "shortName": "GetEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_async", + "file": "servicedirectory_v1_generated_registration_service_get_endpoint_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetEndpoint_async", "segments": [ { "end": 44, @@ -665,8 +665,8 @@ "shortName": "GetEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetEndpoint_sync", + "file": "servicedirectory_v1_generated_registration_service_get_endpoint_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetEndpoint_sync", "segments": [ { "end": 44, @@ -710,8 +710,8 @@ "shortName": "GetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_async", + "file": "servicedirectory_v1_generated_registration_service_get_iam_policy_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetIamPolicy_async", "segments": [ { "end": 44, @@ -754,8 +754,8 @@ "shortName": "GetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_iam_policy_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetIamPolicy_sync", + "file": "servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetIamPolicy_sync", "segments": [ { "end": 44, @@ -799,8 +799,8 @@ "shortName": "GetNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_async", + "file": "servicedirectory_v1_generated_registration_service_get_namespace_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetNamespace_async", "segments": [ { "end": 44, @@ -843,8 +843,8 @@ "shortName": "GetNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetNamespace_sync", + "file": "servicedirectory_v1_generated_registration_service_get_namespace_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetNamespace_sync", "segments": [ { "end": 44, @@ -888,8 +888,8 @@ "shortName": "GetService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_async", + "file": "servicedirectory_v1_generated_registration_service_get_service_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetService_async", "segments": [ { "end": 44, @@ -932,8 +932,8 @@ "shortName": "GetService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_get_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_GetService_sync", + "file": "servicedirectory_v1_generated_registration_service_get_service_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_GetService_sync", "segments": [ { "end": 44, @@ -977,8 +977,8 @@ "shortName": "ListEndpoints" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_async", + "file": "servicedirectory_v1_generated_registration_service_list_endpoints_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_ListEndpoints_async", "segments": [ { "end": 45, @@ -1021,8 +1021,8 @@ "shortName": "ListEndpoints" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_endpoints_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListEndpoints_sync", + "file": "servicedirectory_v1_generated_registration_service_list_endpoints_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_ListEndpoints_sync", "segments": [ { "end": 45, @@ -1066,8 +1066,8 @@ "shortName": "ListNamespaces" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_async", + "file": "servicedirectory_v1_generated_registration_service_list_namespaces_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_ListNamespaces_async", "segments": [ { "end": 45, @@ -1110,8 +1110,8 @@ "shortName": "ListNamespaces" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_namespaces_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListNamespaces_sync", + "file": "servicedirectory_v1_generated_registration_service_list_namespaces_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_ListNamespaces_sync", "segments": [ { "end": 45, @@ -1155,8 +1155,8 @@ "shortName": "ListServices" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_services_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_async", + "file": "servicedirectory_v1_generated_registration_service_list_services_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_ListServices_async", "segments": [ { "end": 45, @@ -1199,8 +1199,8 @@ "shortName": "ListServices" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_list_services_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_ListServices_sync", + "file": "servicedirectory_v1_generated_registration_service_list_services_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_ListServices_sync", "segments": [ { "end": 45, @@ -1244,8 +1244,8 @@ "shortName": "SetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_async", + "file": "servicedirectory_v1_generated_registration_service_set_iam_policy_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_SetIamPolicy_async", "segments": [ { "end": 44, @@ -1288,8 +1288,8 @@ "shortName": "SetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_set_iam_policy_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_SetIamPolicy_sync", + "file": "servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_SetIamPolicy_sync", "segments": [ { "end": 44, @@ -1333,8 +1333,8 @@ "shortName": "TestIamPermissions" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_async", + "file": "servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_TestIamPermissions_async", "segments": [ { "end": 45, @@ -1377,8 +1377,8 @@ "shortName": "TestIamPermissions" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_test_iam_permissions_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_TestIamPermissions_sync", + "file": "servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_TestIamPermissions_sync", "segments": [ { "end": 45, @@ -1422,8 +1422,8 @@ "shortName": "UpdateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_async", + "file": "servicedirectory_v1_generated_registration_service_update_endpoint_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_async", "segments": [ { "end": 43, @@ -1466,8 +1466,8 @@ "shortName": "UpdateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateEndpoint_sync", + "file": "servicedirectory_v1_generated_registration_service_update_endpoint_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_sync", "segments": [ { "end": 43, @@ -1511,8 +1511,8 @@ "shortName": "UpdateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_async", + "file": "servicedirectory_v1_generated_registration_service_update_namespace_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_UpdateNamespace_async", "segments": [ { "end": 43, @@ -1555,8 +1555,8 @@ "shortName": "UpdateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateNamespace_sync", + "file": "servicedirectory_v1_generated_registration_service_update_namespace_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_UpdateNamespace_sync", "segments": [ { "end": 43, @@ -1600,8 +1600,8 @@ "shortName": "UpdateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_async", + "file": "servicedirectory_v1_generated_registration_service_update_service_async.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_UpdateService_async", "segments": [ { "end": 43, @@ -1644,8 +1644,8 @@ "shortName": "UpdateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1_registration_service_update_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1_RegistrationService_UpdateService_sync", + "file": "servicedirectory_v1_generated_registration_service_update_service_sync.py", + "regionTag": "servicedirectory_v1_generated_RegistrationService_UpdateService_sync", "segments": [ { "end": 43, diff --git a/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json b/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json index 6923e019..16e369b7 100644 --- a/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json +++ b/samples/generated_samples/snippet_metadata_servicedirectory_v1beta1.json @@ -10,8 +10,8 @@ "shortName": "ResolveService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_async", + "file": "servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py", + "regionTag": "servicedirectory_v1beta1_generated_LookupService_ResolveService_async", "segments": [ { "end": 44, @@ -54,8 +54,8 @@ "shortName": "ResolveService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_lookup_service_resolve_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_LookupService_ResolveService_sync", + "file": "servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_LookupService_ResolveService_sync", "segments": [ { "end": 44, @@ -99,8 +99,8 @@ "shortName": "CreateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_async", + "file": "servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_async", "segments": [ { "end": 45, @@ -143,8 +143,8 @@ "shortName": "CreateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateEndpoint_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync", "segments": [ { "end": 45, @@ -188,8 +188,8 @@ "shortName": "CreateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_async", + "file": "servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_async", "segments": [ { "end": 45, @@ -232,8 +232,8 @@ "shortName": "CreateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateNamespace_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync", "segments": [ { "end": 45, @@ -277,8 +277,8 @@ "shortName": "CreateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_async", + "file": "servicedirectory_v1beta1_generated_registration_service_create_service_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_CreateService_async", "segments": [ { "end": 45, @@ -321,8 +321,8 @@ "shortName": "CreateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_create_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_CreateService_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_create_service_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync", "segments": [ { "end": 45, @@ -366,8 +366,8 @@ "shortName": "DeleteEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_async", + "file": "servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_async", "segments": [ { "end": 42, @@ -408,8 +408,8 @@ "shortName": "DeleteEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteEndpoint_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync", "segments": [ { "end": 42, @@ -451,8 +451,8 @@ "shortName": "DeleteNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_async", + "file": "servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_async", "segments": [ { "end": 42, @@ -493,8 +493,8 @@ "shortName": "DeleteNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteNamespace_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync", "segments": [ { "end": 42, @@ -536,8 +536,8 @@ "shortName": "DeleteService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_async", + "file": "servicedirectory_v1beta1_generated_registration_service_delete_service_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteService_async", "segments": [ { "end": 42, @@ -578,8 +578,8 @@ "shortName": "DeleteService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_delete_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_DeleteService_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync", "segments": [ { "end": 42, @@ -621,8 +621,8 @@ "shortName": "GetEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_async", + "file": "servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_async", "segments": [ { "end": 44, @@ -665,8 +665,8 @@ "shortName": "GetEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetEndpoint_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync", "segments": [ { "end": 44, @@ -710,8 +710,8 @@ "shortName": "GetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_async", + "file": "servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_async", "segments": [ { "end": 44, @@ -754,8 +754,8 @@ "shortName": "GetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_iam_policy_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetIamPolicy_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync", "segments": [ { "end": 44, @@ -799,8 +799,8 @@ "shortName": "GetNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_async", + "file": "servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_async", "segments": [ { "end": 44, @@ -843,8 +843,8 @@ "shortName": "GetNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetNamespace_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync", "segments": [ { "end": 44, @@ -888,8 +888,8 @@ "shortName": "GetService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_async", + "file": "servicedirectory_v1beta1_generated_registration_service_get_service_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetService_async", "segments": [ { "end": 44, @@ -932,8 +932,8 @@ "shortName": "GetService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_get_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_GetService_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_get_service_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_GetService_sync", "segments": [ { "end": 44, @@ -977,8 +977,8 @@ "shortName": "ListEndpoints" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_async", + "file": "servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_async", "segments": [ { "end": 45, @@ -1021,8 +1021,8 @@ "shortName": "ListEndpoints" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_endpoints_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListEndpoints_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync", "segments": [ { "end": 45, @@ -1066,8 +1066,8 @@ "shortName": "ListNamespaces" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_async", + "file": "servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_async", "segments": [ { "end": 45, @@ -1110,8 +1110,8 @@ "shortName": "ListNamespaces" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_namespaces_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListNamespaces_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync", "segments": [ { "end": 45, @@ -1155,8 +1155,8 @@ "shortName": "ListServices" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_async", + "file": "servicedirectory_v1beta1_generated_registration_service_list_services_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_ListServices_async", "segments": [ { "end": 45, @@ -1199,8 +1199,8 @@ "shortName": "ListServices" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_list_services_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_ListServices_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_list_services_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync", "segments": [ { "end": 45, @@ -1244,8 +1244,8 @@ "shortName": "SetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_async", + "file": "servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_async", "segments": [ { "end": 44, @@ -1288,8 +1288,8 @@ "shortName": "SetIamPolicy" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_set_iam_policy_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_SetIamPolicy_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync", "segments": [ { "end": 44, @@ -1333,8 +1333,8 @@ "shortName": "TestIamPermissions" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_async", + "file": "servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_async", "segments": [ { "end": 45, @@ -1377,8 +1377,8 @@ "shortName": "TestIamPermissions" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_test_iam_permissions_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_TestIamPermissions_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync", "segments": [ { "end": 45, @@ -1422,8 +1422,8 @@ "shortName": "UpdateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_async", + "file": "servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_async", "segments": [ { "end": 43, @@ -1466,8 +1466,8 @@ "shortName": "UpdateEndpoint" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_endpoint_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateEndpoint_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync", "segments": [ { "end": 43, @@ -1511,8 +1511,8 @@ "shortName": "UpdateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_async", + "file": "servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_async", "segments": [ { "end": 43, @@ -1555,8 +1555,8 @@ "shortName": "UpdateNamespace" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_namespace_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateNamespace_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync", "segments": [ { "end": 43, @@ -1600,8 +1600,8 @@ "shortName": "UpdateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_async.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_async", + "file": "servicedirectory_v1beta1_generated_registration_service_update_service_async.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateService_async", "segments": [ { "end": 43, @@ -1644,8 +1644,8 @@ "shortName": "UpdateService" } }, - "file": "servicedirectory_generated_servicedirectory_v1beta1_registration_service_update_service_sync.py", - "regionTag": "servicedirectory_generated_servicedirectory_v1beta1_RegistrationService_UpdateService_sync", + "file": "servicedirectory_v1beta1_generated_registration_service_update_service_sync.py", + "regionTag": "servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync", "segments": [ { "end": 43, From 491fb0d85768970b21766bf5ad6b3958f07f5c86 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 05:46:21 -0500 Subject: [PATCH 13/14] chore: update copyright year to 2022 (#155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update copyright year to 2022 PiperOrigin-RevId: 431037888 Source-Link: https://github.com/googleapis/googleapis/commit/b3397f5febbf21dfc69b875ddabaf76bee765058 Source-Link: https://github.com/googleapis/googleapis-gen/commit/510b54e1cdefd53173984df16645081308fe897e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTEwYjU0ZTFjZGVmZDUzMTczOTg0ZGYxNjY0NTA4MTMwOGZlODk3ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google/cloud/servicedirectory/__init__.py | 2 +- google/cloud/servicedirectory_v1/__init__.py | 2 +- google/cloud/servicedirectory_v1/services/__init__.py | 2 +- .../servicedirectory_v1/services/lookup_service/__init__.py | 2 +- .../servicedirectory_v1/services/lookup_service/async_client.py | 2 +- .../cloud/servicedirectory_v1/services/lookup_service/client.py | 2 +- .../services/lookup_service/transports/__init__.py | 2 +- .../services/lookup_service/transports/base.py | 2 +- .../services/lookup_service/transports/grpc.py | 2 +- .../services/lookup_service/transports/grpc_asyncio.py | 2 +- .../services/registration_service/__init__.py | 2 +- .../services/registration_service/async_client.py | 2 +- .../servicedirectory_v1/services/registration_service/client.py | 2 +- .../servicedirectory_v1/services/registration_service/pagers.py | 2 +- .../services/registration_service/transports/__init__.py | 2 +- .../services/registration_service/transports/base.py | 2 +- .../services/registration_service/transports/grpc.py | 2 +- .../services/registration_service/transports/grpc_asyncio.py | 2 +- google/cloud/servicedirectory_v1/types/__init__.py | 2 +- google/cloud/servicedirectory_v1/types/endpoint.py | 2 +- google/cloud/servicedirectory_v1/types/lookup_service.py | 2 +- google/cloud/servicedirectory_v1/types/namespace.py | 2 +- google/cloud/servicedirectory_v1/types/registration_service.py | 2 +- google/cloud/servicedirectory_v1/types/service.py | 2 +- google/cloud/servicedirectory_v1beta1/__init__.py | 2 +- google/cloud/servicedirectory_v1beta1/services/__init__.py | 2 +- .../services/lookup_service/__init__.py | 2 +- .../services/lookup_service/async_client.py | 2 +- .../servicedirectory_v1beta1/services/lookup_service/client.py | 2 +- .../services/lookup_service/transports/__init__.py | 2 +- .../services/lookup_service/transports/base.py | 2 +- .../services/lookup_service/transports/grpc.py | 2 +- .../services/lookup_service/transports/grpc_asyncio.py | 2 +- .../services/registration_service/__init__.py | 2 +- .../services/registration_service/async_client.py | 2 +- .../services/registration_service/client.py | 2 +- .../services/registration_service/pagers.py | 2 +- .../services/registration_service/transports/__init__.py | 2 +- .../services/registration_service/transports/base.py | 2 +- .../services/registration_service/transports/grpc.py | 2 +- .../services/registration_service/transports/grpc_asyncio.py | 2 +- google/cloud/servicedirectory_v1beta1/types/__init__.py | 2 +- google/cloud/servicedirectory_v1beta1/types/endpoint.py | 2 +- google/cloud/servicedirectory_v1beta1/types/lookup_service.py | 2 +- google/cloud/servicedirectory_v1beta1/types/namespace.py | 2 +- .../servicedirectory_v1beta1/types/registration_service.py | 2 +- google/cloud/servicedirectory_v1beta1/types/service.py | 2 +- ...rectory_v1_generated_lookup_service_resolve_service_async.py | 2 +- ...irectory_v1_generated_lookup_service_resolve_service_sync.py | 2 +- ...y_v1_generated_registration_service_create_endpoint_async.py | 2 +- ...ry_v1_generated_registration_service_create_endpoint_sync.py | 2 +- ..._v1_generated_registration_service_create_namespace_async.py | 2 +- ...y_v1_generated_registration_service_create_namespace_sync.py | 2 +- ...ry_v1_generated_registration_service_create_service_async.py | 2 +- ...ory_v1_generated_registration_service_create_service_sync.py | 2 +- ...y_v1_generated_registration_service_delete_endpoint_async.py | 2 +- ...ry_v1_generated_registration_service_delete_endpoint_sync.py | 2 +- ..._v1_generated_registration_service_delete_namespace_async.py | 2 +- ...y_v1_generated_registration_service_delete_namespace_sync.py | 2 +- ...ry_v1_generated_registration_service_delete_service_async.py | 2 +- ...ory_v1_generated_registration_service_delete_service_sync.py | 2 +- ...tory_v1_generated_registration_service_get_endpoint_async.py | 2 +- ...ctory_v1_generated_registration_service_get_endpoint_sync.py | 2 +- ...ry_v1_generated_registration_service_get_iam_policy_async.py | 2 +- ...ory_v1_generated_registration_service_get_iam_policy_sync.py | 2 +- ...ory_v1_generated_registration_service_get_namespace_async.py | 2 +- ...tory_v1_generated_registration_service_get_namespace_sync.py | 2 +- ...ctory_v1_generated_registration_service_get_service_async.py | 2 +- ...ectory_v1_generated_registration_service_get_service_sync.py | 2 +- ...ry_v1_generated_registration_service_list_endpoints_async.py | 2 +- ...ory_v1_generated_registration_service_list_endpoints_sync.py | 2 +- ...y_v1_generated_registration_service_list_namespaces_async.py | 2 +- ...ry_v1_generated_registration_service_list_namespaces_sync.py | 2 +- ...ory_v1_generated_registration_service_list_services_async.py | 2 +- ...tory_v1_generated_registration_service_list_services_sync.py | 2 +- ...ry_v1_generated_registration_service_set_iam_policy_async.py | 2 +- ...ory_v1_generated_registration_service_set_iam_policy_sync.py | 2 +- ...generated_registration_service_test_iam_permissions_async.py | 2 +- ..._generated_registration_service_test_iam_permissions_sync.py | 2 +- ...y_v1_generated_registration_service_update_endpoint_async.py | 2 +- ...ry_v1_generated_registration_service_update_endpoint_sync.py | 2 +- ..._v1_generated_registration_service_update_namespace_async.py | 2 +- ...y_v1_generated_registration_service_update_namespace_sync.py | 2 +- ...ry_v1_generated_registration_service_update_service_async.py | 2 +- ...ory_v1_generated_registration_service_update_service_sync.py | 2 +- ...ry_v1beta1_generated_lookup_service_resolve_service_async.py | 2 +- ...ory_v1beta1_generated_lookup_service_resolve_service_sync.py | 2 +- ...eta1_generated_registration_service_create_endpoint_async.py | 2 +- ...beta1_generated_registration_service_create_endpoint_sync.py | 2 +- ...ta1_generated_registration_service_create_namespace_async.py | 2 +- ...eta1_generated_registration_service_create_namespace_sync.py | 2 +- ...beta1_generated_registration_service_create_service_async.py | 2 +- ...1beta1_generated_registration_service_create_service_sync.py | 2 +- ...eta1_generated_registration_service_delete_endpoint_async.py | 2 +- ...beta1_generated_registration_service_delete_endpoint_sync.py | 2 +- ...ta1_generated_registration_service_delete_namespace_async.py | 2 +- ...eta1_generated_registration_service_delete_namespace_sync.py | 2 +- ...beta1_generated_registration_service_delete_service_async.py | 2 +- ...1beta1_generated_registration_service_delete_service_sync.py | 2 +- ...v1beta1_generated_registration_service_get_endpoint_async.py | 2 +- ..._v1beta1_generated_registration_service_get_endpoint_sync.py | 2 +- ...beta1_generated_registration_service_get_iam_policy_async.py | 2 +- ...1beta1_generated_registration_service_get_iam_policy_sync.py | 2 +- ...1beta1_generated_registration_service_get_namespace_async.py | 2 +- ...v1beta1_generated_registration_service_get_namespace_sync.py | 2 +- ..._v1beta1_generated_registration_service_get_service_async.py | 2 +- ...y_v1beta1_generated_registration_service_get_service_sync.py | 2 +- ...beta1_generated_registration_service_list_endpoints_async.py | 2 +- ...1beta1_generated_registration_service_list_endpoints_sync.py | 2 +- ...eta1_generated_registration_service_list_namespaces_async.py | 2 +- ...beta1_generated_registration_service_list_namespaces_sync.py | 2 +- ...1beta1_generated_registration_service_list_services_async.py | 2 +- ...v1beta1_generated_registration_service_list_services_sync.py | 2 +- ...beta1_generated_registration_service_set_iam_policy_async.py | 2 +- ...1beta1_generated_registration_service_set_iam_policy_sync.py | 2 +- ...generated_registration_service_test_iam_permissions_async.py | 2 +- ..._generated_registration_service_test_iam_permissions_sync.py | 2 +- ...eta1_generated_registration_service_update_endpoint_async.py | 2 +- ...beta1_generated_registration_service_update_endpoint_sync.py | 2 +- ...ta1_generated_registration_service_update_namespace_async.py | 2 +- ...eta1_generated_registration_service_update_namespace_sync.py | 2 +- ...beta1_generated_registration_service_update_service_async.py | 2 +- ...1beta1_generated_registration_service_update_service_sync.py | 2 +- scripts/fixup_servicedirectory_v1_keywords.py | 2 +- scripts/fixup_servicedirectory_v1beta1_keywords.py | 2 +- tests/__init__.py | 2 +- tests/unit/__init__.py | 2 +- tests/unit/gapic/__init__.py | 2 +- tests/unit/gapic/servicedirectory_v1/__init__.py | 2 +- tests/unit/gapic/servicedirectory_v1/test_lookup_service.py | 2 +- .../unit/gapic/servicedirectory_v1/test_registration_service.py | 2 +- tests/unit/gapic/servicedirectory_v1beta1/__init__.py | 2 +- .../unit/gapic/servicedirectory_v1beta1/test_lookup_service.py | 2 +- .../gapic/servicedirectory_v1beta1/test_registration_service.py | 2 +- 134 files changed, 134 insertions(+), 134 deletions(-) diff --git a/google/cloud/servicedirectory/__init__.py b/google/cloud/servicedirectory/__init__.py index 5d594cf0..81c52dcb 100644 --- a/google/cloud/servicedirectory/__init__.py +++ b/google/cloud/servicedirectory/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/__init__.py b/google/cloud/servicedirectory_v1/__init__.py index 0ff3583f..3e8cf241 100644 --- a/google/cloud/servicedirectory_v1/__init__.py +++ b/google/cloud/servicedirectory_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/__init__.py b/google/cloud/servicedirectory_v1/services/__init__.py index 4de65971..e8e1c384 100644 --- a/google/cloud/servicedirectory_v1/services/__init__.py +++ b/google/cloud/servicedirectory_v1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/__init__.py b/google/cloud/servicedirectory_v1/services/lookup_service/__init__.py index af3da06c..7274594d 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/__init__.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py index f1b9c393..f3bb4190 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1/services/lookup_service/client.py index c056a37c..c05271b2 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py index 250bbb08..29355a3c 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py index 317e7cfb..8c2250ab 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py index f0460f4f..5dad73e3 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py index 716fbfec..27d2ad0a 100644 --- a/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/lookup_service/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/__init__.py b/google/cloud/servicedirectory_v1/services/registration_service/__init__.py index d2bd15c3..99f38bae 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/__init__.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py index 61b97c5c..4bea142b 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/client.py b/google/cloud/servicedirectory_v1/services/registration_service/client.py index 7428de85..0cd8c7cb 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/pagers.py b/google/cloud/servicedirectory_v1/services/registration_service/pagers.py index 60255350..b978965e 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/pagers.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/pagers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py index de2c3f38..0674f3d2 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py index 86f40a47..0dabacbb 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py index 574d11e3..41c253a7 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py index 28ca4444..9bcf8717 100644 --- a/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1/services/registration_service/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/types/__init__.py b/google/cloud/servicedirectory_v1/types/__init__.py index 72750193..1b15b2ac 100644 --- a/google/cloud/servicedirectory_v1/types/__init__.py +++ b/google/cloud/servicedirectory_v1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/types/endpoint.py b/google/cloud/servicedirectory_v1/types/endpoint.py index 92a4c0e8..124b06af 100644 --- a/google/cloud/servicedirectory_v1/types/endpoint.py +++ b/google/cloud/servicedirectory_v1/types/endpoint.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/types/lookup_service.py b/google/cloud/servicedirectory_v1/types/lookup_service.py index d88774f4..2927fc7a 100644 --- a/google/cloud/servicedirectory_v1/types/lookup_service.py +++ b/google/cloud/servicedirectory_v1/types/lookup_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/types/namespace.py b/google/cloud/servicedirectory_v1/types/namespace.py index 46a9a407..cdb8f24f 100644 --- a/google/cloud/servicedirectory_v1/types/namespace.py +++ b/google/cloud/servicedirectory_v1/types/namespace.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/types/registration_service.py b/google/cloud/servicedirectory_v1/types/registration_service.py index c1a235f4..e40025bb 100644 --- a/google/cloud/servicedirectory_v1/types/registration_service.py +++ b/google/cloud/servicedirectory_v1/types/registration_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1/types/service.py b/google/cloud/servicedirectory_v1/types/service.py index a7833fd4..4da417ab 100644 --- a/google/cloud/servicedirectory_v1/types/service.py +++ b/google/cloud/servicedirectory_v1/types/service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/__init__.py b/google/cloud/servicedirectory_v1beta1/__init__.py index 0ff3583f..3e8cf241 100644 --- a/google/cloud/servicedirectory_v1beta1/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/__init__.py b/google/cloud/servicedirectory_v1beta1/services/__init__.py index 4de65971..e8e1c384 100644 --- a/google/cloud/servicedirectory_v1beta1/services/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/__init__.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/__init__.py index af3da06c..7274594d 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py index 2c8eefbf..640445d3 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py index bcd62dd8..c329d7a6 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py index 250bbb08..29355a3c 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py index 1b7478cb..a287b36c 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py index 968bd547..11e59347 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py index ddb7a934..d0db1181 100644 --- a/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/lookup_service/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/__init__.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/__init__.py index d2bd15c3..99f38bae 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py index 3a5d2d86..cd02f0c4 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py index dd0b1584..b2dbf95b 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/pagers.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/pagers.py index 45014982..069e0cc6 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/pagers.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/pagers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py index de2c3f38..0674f3d2 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py index 63779139..cfbbe755 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py index 5b993a21..d6ac9349 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py index eca442bc..d633aa0f 100644 --- a/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py +++ b/google/cloud/servicedirectory_v1beta1/services/registration_service/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/types/__init__.py b/google/cloud/servicedirectory_v1beta1/types/__init__.py index 72750193..1b15b2ac 100644 --- a/google/cloud/servicedirectory_v1beta1/types/__init__.py +++ b/google/cloud/servicedirectory_v1beta1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/types/endpoint.py b/google/cloud/servicedirectory_v1beta1/types/endpoint.py index 2d9307bf..57f8c12c 100644 --- a/google/cloud/servicedirectory_v1beta1/types/endpoint.py +++ b/google/cloud/servicedirectory_v1beta1/types/endpoint.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/types/lookup_service.py b/google/cloud/servicedirectory_v1beta1/types/lookup_service.py index f0e91ba9..e992731b 100644 --- a/google/cloud/servicedirectory_v1beta1/types/lookup_service.py +++ b/google/cloud/servicedirectory_v1beta1/types/lookup_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/types/namespace.py b/google/cloud/servicedirectory_v1beta1/types/namespace.py index 4787938c..49a5838f 100644 --- a/google/cloud/servicedirectory_v1beta1/types/namespace.py +++ b/google/cloud/servicedirectory_v1beta1/types/namespace.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/types/registration_service.py b/google/cloud/servicedirectory_v1beta1/types/registration_service.py index 127250ae..e6c0979f 100644 --- a/google/cloud/servicedirectory_v1beta1/types/registration_service.py +++ b/google/cloud/servicedirectory_v1beta1/types/registration_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/servicedirectory_v1beta1/types/service.py b/google/cloud/servicedirectory_v1beta1/types/service.py index d2431a20..bd6b1c0d 100644 --- a/google/cloud/servicedirectory_v1beta1/types/service.py +++ b/google/cloud/servicedirectory_v1beta1/types/service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py index 073ba421..75e61a04 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py index 2d52f30e..78b34856 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_lookup_service_resolve_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py index af2b9815..c5967f71 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py index 5e90f25c..69e439ab 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py index 2cee0c02..68cb046f 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py index 02d64364..2531a9ae 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py index 52f535d0..9e0dcfb1 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py index d48e0ba8..b7ff9342 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_create_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py index aa295bed..722ef019 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py index b1bbca88..48ab5acd 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py index f29c8acf..94f76cab 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py index b82419a7..47f170a5 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py index b658195c..e0d892ab 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py index abadcd9c..eb4be1ff 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_delete_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py index ab777789..8af548ee 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py index d00826cc..203128ce 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py index 6ed21fc6..e82b5b5a 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py index db6e766d..b6f93c35 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_iam_policy_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py index 00119fe7..e37ba2c6 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py index dec47bac..17c0e1c7 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py index 7da4c546..cf48cf79 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py index c131ca78..b1cc87a1 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_get_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py index 46d27202..00ea8d41 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py index 08c8480f..11599034 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_endpoints_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py index ce9dde3c..7242f682 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py index a756aa4d..ac8db8d8 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_namespaces_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py index 36b4ec6e..3ec6dd7b 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py index cc3709db..6b07f8c2 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py index 809039f9..34cb2dc0 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py index f4a4b85b..c0d72670 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_set_iam_policy_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py index c47060e6..6545a776 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py index 00a3819b..131c335c 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_test_iam_permissions_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py index 296dbfb9..cf6a45f6 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py index 2e27ee69..4a669417 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py index 5754c298..8c789aa9 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py index 1c84e729..8d99b790 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py index a56816a3..764ce475 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py index c2e7bbff..5f95fac5 100644 --- a/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1_generated_registration_service_update_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py index 13faed0d..935cbd67 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py index 4f6ea8cd..d161c21a 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_lookup_service_resolve_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py index b5bb4830..0eeaa743 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py index b2b09010..5ccbd837 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py index d47f61de..70d22d9c 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py index 259ae669..29dadaa9 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py index 919819a6..27c231ab 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py index 36886caa..4b1272f9 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_create_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py index bfdacf11..4501014c 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py index 8fdef122..0ea2533a 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py index 97e5b89f..27583fe0 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py index 6c8ec187..2c1bbb57 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py index 2a67b60c..41541965 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py index 598e1c06..1f3c077d 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_delete_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py index ea39b6ef..8f3b9052 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py index 1799c130..94870ce8 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py index ebbb1efb..3cbd8252 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py index a64862b0..bcb15f5e 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_iam_policy_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py index 72ee02a2..36697294 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py index 12d5687f..451ae330 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py index 5f180ebc..c51e49e4 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py index c40e0ab4..b438cbb1 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_get_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py index 4801b724..e54cd879 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py index 07ed71e6..bef3ae66 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_endpoints_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py index 830ab573..dbf680b7 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py index 4d7c89e5..efbf6e3a 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_namespaces_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py index fb474d1d..97df0aaa 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py index 791497ed..7a18f52e 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_list_services_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py index dc3a3f35..3974ed05 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py index 095a4ab7..e754df98 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_set_iam_policy_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py index ec0fd3ac..359880e8 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py index 89c5894f..dd4c483d 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_test_iam_permissions_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py index fb6b79fa..34c4fd65 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py index f3304f44..18b4066b 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_endpoint_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py index 930067ec..a22ebd57 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py index d39a4893..ca31ec63 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_namespace_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py index 619a5a25..61d72a5c 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py index aab21ad0..43b4570a 100644 --- a/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py +++ b/samples/generated_samples/servicedirectory_v1beta1_generated_registration_service_update_service_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/fixup_servicedirectory_v1_keywords.py b/scripts/fixup_servicedirectory_v1_keywords.py index 892e98cf..c6941ce8 100644 --- a/scripts/fixup_servicedirectory_v1_keywords.py +++ b/scripts/fixup_servicedirectory_v1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/fixup_servicedirectory_v1beta1_keywords.py b/scripts/fixup_servicedirectory_v1beta1_keywords.py index 892e98cf..c6941ce8 100644 --- a/scripts/fixup_servicedirectory_v1beta1_keywords.py +++ b/scripts/fixup_servicedirectory_v1beta1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/__init__.py b/tests/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/__init__.py b/tests/unit/gapic/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/gapic/__init__.py +++ b/tests/unit/gapic/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/servicedirectory_v1/__init__.py b/tests/unit/gapic/servicedirectory_v1/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/gapic/servicedirectory_v1/__init__.py +++ b/tests/unit/gapic/servicedirectory_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py index 607015da..7c32119b 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_lookup_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py index 1221422d..473121a2 100644 --- a/tests/unit/gapic/servicedirectory_v1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1/test_registration_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/servicedirectory_v1beta1/__init__.py b/tests/unit/gapic/servicedirectory_v1beta1/__init__.py index 4de65971..e8e1c384 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/__init__.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py index 83b48538..ddec5a45 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_lookup_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py index 8ee9f978..833acd8c 100644 --- a/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py +++ b/tests/unit/gapic/servicedirectory_v1beta1/test_registration_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From c38553dbfaf0ce09f0c5c00793dcfd1eea9f2424 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 17:49:52 -0500 Subject: [PATCH 14/14] chore(main): release 1.3.0 (#149) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++++++ setup.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37e41ed0..cf4cf0b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.3.0](https://github.com/googleapis/python-service-directory/compare/v1.2.1...v1.3.0) (2022-02-26) + + +### Features + +* add api key support ([#148](https://github.com/googleapis/python-service-directory/issues/148)) ([a562a5d](https://github.com/googleapis/python-service-directory/commit/a562a5d8f530b41078062612b9916bc76882f211)) + + +### Bug Fixes + +* resolve DuplicateCredentialArgs error when using credentials_file ([55c52b5](https://github.com/googleapis/python-service-directory/commit/55c52b5b67891ac723a34fae22040feb5b5fcf15)) + ### [1.2.1](https://www.github.com/googleapis/python-service-directory/compare/v1.2.0...v1.2.1) (2021-11-01) diff --git a/setup.py b/setup.py index d4f39f07..5254cab1 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import os import setuptools # type: ignore -version = "1.2.1" +version = "1.3.0" package_root = os.path.abspath(os.path.dirname(__file__))