diff --git a/google/cloud/retail_v2/services/catalog_service/client.py b/google/cloud/retail_v2/services/catalog_service/client.py index 52b27a38..7a0adad3 100644 --- a/google/cloud/retail_v2/services/catalog_service/client.py +++ b/google/cloud/retail_v2/services/catalog_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +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 @@ -372,7 +372,7 @@ def __init__( def list_catalogs( self, - request: catalog_service.ListCatalogsRequest = None, + request: Union[catalog_service.ListCatalogsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -383,7 +383,7 @@ def list_catalogs( associated with the project. Args: - request (google.cloud.retail_v2.types.ListCatalogsRequest): + request (Union[google.cloud.retail_v2.types.ListCatalogsRequest, dict]): The request object. Request for [CatalogService.ListCatalogs][google.cloud.retail.v2.CatalogService.ListCatalogs] method. @@ -460,7 +460,7 @@ def list_catalogs( def update_catalog( self, - request: catalog_service.UpdateCatalogRequest = None, + request: Union[catalog_service.UpdateCatalogRequest, dict] = None, *, catalog: gcr_catalog.Catalog = None, update_mask: field_mask_pb2.FieldMask = None, @@ -471,7 +471,7 @@ def update_catalog( r"""Updates the [Catalog][google.cloud.retail.v2.Catalog]s. Args: - request (google.cloud.retail_v2.types.UpdateCatalogRequest): + request (Union[google.cloud.retail_v2.types.UpdateCatalogRequest, dict]): The request object. Request for [CatalogService.UpdateCatalog][google.cloud.retail.v2.CatalogService.UpdateCatalog] method. @@ -553,7 +553,7 @@ def update_catalog( def set_default_branch( self, - request: catalog_service.SetDefaultBranchRequest = None, + request: Union[catalog_service.SetDefaultBranchRequest, dict] = None, *, catalog: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -602,7 +602,7 @@ def set_default_branch( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.SetDefaultBranchRequest): + request (Union[google.cloud.retail_v2.types.SetDefaultBranchRequest, dict]): The request object. Request message to set a specified branch as new default_branch. catalog (str): @@ -656,7 +656,7 @@ def set_default_branch( def get_default_branch( self, - request: catalog_service.GetDefaultBranchRequest = None, + request: Union[catalog_service.GetDefaultBranchRequest, dict] = None, *, catalog: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -673,7 +673,7 @@ def get_default_branch( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.GetDefaultBranchRequest): + request (Union[google.cloud.retail_v2.types.GetDefaultBranchRequest, dict]): The request object. Request message to show which branch is currently the default branch. catalog (str): diff --git a/google/cloud/retail_v2/services/catalog_service/transports/base.py b/google/cloud/retail_v2/services/catalog_service/transports/base.py index 917f370c..27a8d130 100644 --- a/google/cloud/retail_v2/services/catalog_service/transports/base.py +++ b/google/cloud/retail_v2/services/catalog_service/transports/base.py @@ -117,7 +117,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/retail_v2/services/catalog_service/transports/grpc.py b/google/cloud/retail_v2/services/catalog_service/transports/grpc.py index 44645f41..5f9185d1 100644 --- a/google/cloud/retail_v2/services/catalog_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/catalog_service/transports/grpc.py @@ -82,16 +82,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/catalog_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/catalog_service/transports/grpc_asyncio.py index 57ab116a..d967c1fd 100644 --- a/google/cloud/retail_v2/services/catalog_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/catalog_service/transports/grpc_asyncio.py @@ -129,16 +129,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/completion_service/client.py b/google/cloud/retail_v2/services/completion_service/client.py index 056a16e7..4708f498 100644 --- a/google/cloud/retail_v2/services/completion_service/client.py +++ b/google/cloud/retail_v2/services/completion_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +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 @@ -362,7 +362,7 @@ def __init__( def complete_query( self, - request: completion_service.CompleteQueryRequest = None, + request: Union[completion_service.CompleteQueryRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -376,7 +376,7 @@ def complete_query( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.CompleteQueryRequest): + request (Union[google.cloud.retail_v2.types.CompleteQueryRequest, dict]): The request object. Auto-complete parameters. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -414,7 +414,7 @@ def complete_query( def import_completion_data( self, - request: import_config.ImportCompletionDataRequest = None, + request: Union[import_config.ImportCompletionDataRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -431,7 +431,7 @@ def import_completion_data( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.ImportCompletionDataRequest): + request (Union[google.cloud.retail_v2.types.ImportCompletionDataRequest, dict]): The request object. Request message for ImportCompletionData methods. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/retail_v2/services/completion_service/transports/base.py b/google/cloud/retail_v2/services/completion_service/transports/base.py index a5953551..3cfb7c1d 100644 --- a/google/cloud/retail_v2/services/completion_service/transports/base.py +++ b/google/cloud/retail_v2/services/completion_service/transports/base.py @@ -118,7 +118,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/retail_v2/services/completion_service/transports/grpc.py b/google/cloud/retail_v2/services/completion_service/transports/grpc.py index e6f3a9ec..2bc86b79 100644 --- a/google/cloud/retail_v2/services/completion_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/completion_service/transports/grpc.py @@ -88,16 +88,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py index f20c73fe..bf777c8c 100644 --- a/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/completion_service/transports/grpc_asyncio.py @@ -135,16 +135,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/prediction_service/client.py b/google/cloud/retail_v2/services/prediction_service/client.py index 8f429c8f..39183b9a 100644 --- a/google/cloud/retail_v2/services/prediction_service/client.py +++ b/google/cloud/retail_v2/services/prediction_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +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 @@ -359,7 +359,7 @@ def __init__( def predict( self, - request: prediction_service.PredictRequest = None, + request: Union[prediction_service.PredictRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -368,7 +368,7 @@ def predict( r"""Makes a recommendation prediction. Args: - request (google.cloud.retail_v2.types.PredictRequest): + request (Union[google.cloud.retail_v2.types.PredictRequest, dict]): The request object. Request message for Predict method. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. diff --git a/google/cloud/retail_v2/services/prediction_service/transports/base.py b/google/cloud/retail_v2/services/prediction_service/transports/base.py index a5416637..eb850e7b 100644 --- a/google/cloud/retail_v2/services/prediction_service/transports/base.py +++ b/google/cloud/retail_v2/services/prediction_service/transports/base.py @@ -115,7 +115,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/retail_v2/services/prediction_service/transports/grpc.py b/google/cloud/retail_v2/services/prediction_service/transports/grpc.py index e294096b..ca2e3089 100644 --- a/google/cloud/retail_v2/services/prediction_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/prediction_service/transports/grpc.py @@ -80,16 +80,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/prediction_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/prediction_service/transports/grpc_asyncio.py index 50e57d17..d7bf8ff3 100644 --- a/google/cloud/retail_v2/services/prediction_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/prediction_service/transports/grpc_asyncio.py @@ -127,16 +127,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/product_service/client.py b/google/cloud/retail_v2/services/product_service/client.py index 3edf319b..a9afa377 100644 --- a/google/cloud/retail_v2/services/product_service/client.py +++ b/google/cloud/retail_v2/services/product_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +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 @@ -386,7 +386,7 @@ def __init__( def create_product( self, - request: product_service.CreateProductRequest = None, + request: Union[product_service.CreateProductRequest, dict] = None, *, parent: str = None, product: gcr_product.Product = None, @@ -398,7 +398,7 @@ def create_product( r"""Creates a [Product][google.cloud.retail.v2.Product]. Args: - request (google.cloud.retail_v2.types.CreateProductRequest): + request (Union[google.cloud.retail_v2.types.CreateProductRequest, dict]): The request object. Request message for [CreateProduct][] method. parent (str): @@ -494,7 +494,7 @@ def create_product( def get_product( self, - request: product_service.GetProductRequest = None, + request: Union[product_service.GetProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -504,7 +504,7 @@ def get_product( r"""Gets a [Product][google.cloud.retail.v2.Product]. Args: - request (google.cloud.retail_v2.types.GetProductRequest): + request (Union[google.cloud.retail_v2.types.GetProductRequest, dict]): The request object. Request message for [GetProduct][] method. name (str): @@ -576,7 +576,7 @@ def get_product( def list_products( self, - request: product_service.ListProductsRequest = None, + request: Union[product_service.ListProductsRequest, dict] = None, *, parent: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -586,7 +586,7 @@ def list_products( r"""Gets a list of [Product][google.cloud.retail.v2.Product]s. Args: - request (google.cloud.retail_v2.types.ListProductsRequest): + request (Union[google.cloud.retail_v2.types.ListProductsRequest, dict]): The request object. Request message for [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts] method. @@ -665,7 +665,7 @@ def list_products( def update_product( self, - request: product_service.UpdateProductRequest = None, + request: Union[product_service.UpdateProductRequest, dict] = None, *, product: gcr_product.Product = None, update_mask: field_mask_pb2.FieldMask = None, @@ -676,7 +676,7 @@ def update_product( r"""Updates a [Product][google.cloud.retail.v2.Product]. Args: - request (google.cloud.retail_v2.types.UpdateProductRequest): + request (Union[google.cloud.retail_v2.types.UpdateProductRequest, dict]): The request object. Request message for [UpdateProduct][] method. product (google.cloud.retail_v2.types.Product): @@ -764,7 +764,7 @@ def update_product( def delete_product( self, - request: product_service.DeleteProductRequest = None, + request: Union[product_service.DeleteProductRequest, dict] = None, *, name: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -774,7 +774,7 @@ def delete_product( r"""Deletes a [Product][google.cloud.retail.v2.Product]. Args: - request (google.cloud.retail_v2.types.DeleteProductRequest): + request (Union[google.cloud.retail_v2.types.DeleteProductRequest, dict]): The request object. Request message for [DeleteProduct][] method. name (str): @@ -851,7 +851,7 @@ def delete_product( def import_products( self, - request: import_config.ImportProductsRequest = None, + request: Union[import_config.ImportProductsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -868,7 +868,7 @@ def import_products( updated. Args: - request (google.cloud.retail_v2.types.ImportProductsRequest): + request (Union[google.cloud.retail_v2.types.ImportProductsRequest, dict]): The request object. Request message for Import methods. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. @@ -922,7 +922,7 @@ def import_products( def set_inventory( self, - request: product_service.SetInventoryRequest = None, + request: Union[product_service.SetInventoryRequest, dict] = None, *, inventory: product.Product = None, set_mask: field_mask_pb2.FieldMask = None, @@ -979,7 +979,7 @@ def set_inventory( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.SetInventoryRequest): + request (Union[google.cloud.retail_v2.types.SetInventoryRequest, dict]): The request object. Request message for [SetInventory][] method. inventory (google.cloud.retail_v2.types.Product): @@ -1107,7 +1107,7 @@ def set_inventory( def add_fulfillment_places( self, - request: product_service.AddFulfillmentPlacesRequest = None, + request: Union[product_service.AddFulfillmentPlacesRequest, dict] = None, *, product: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1134,7 +1134,7 @@ def add_fulfillment_places( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.AddFulfillmentPlacesRequest): + request (Union[google.cloud.retail_v2.types.AddFulfillmentPlacesRequest, dict]): The request object. Request message for [AddFulfillmentPlaces][] method. product (str): @@ -1212,7 +1212,7 @@ def add_fulfillment_places( def remove_fulfillment_places( self, - request: product_service.RemoveFulfillmentPlacesRequest = None, + request: Union[product_service.RemoveFulfillmentPlacesRequest, dict] = None, *, product: str = None, retry: retries.Retry = gapic_v1.method.DEFAULT, @@ -1239,7 +1239,7 @@ def remove_fulfillment_places( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.RemoveFulfillmentPlacesRequest): + request (Union[google.cloud.retail_v2.types.RemoveFulfillmentPlacesRequest, dict]): The request object. Request message for [RemoveFulfillmentPlaces][] method. product (str): diff --git a/google/cloud/retail_v2/services/product_service/transports/base.py b/google/cloud/retail_v2/services/product_service/transports/base.py index ef92274e..3444c918 100644 --- a/google/cloud/retail_v2/services/product_service/transports/base.py +++ b/google/cloud/retail_v2/services/product_service/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/retail_v2/services/product_service/transports/grpc.py b/google/cloud/retail_v2/services/product_service/transports/grpc.py index f2792df5..bcfef051 100644 --- a/google/cloud/retail_v2/services/product_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/product_service/transports/grpc.py @@ -87,16 +87,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py index a06268db..baf40438 100644 --- a/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/product_service/transports/grpc_asyncio.py @@ -134,16 +134,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/search_service/client.py b/google/cloud/retail_v2/services/search_service/client.py index 177b7ee4..d2359507 100644 --- a/google/cloud/retail_v2/services/search_service/client.py +++ b/google/cloud/retail_v2/services/search_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +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 @@ -378,7 +378,7 @@ def __init__( def search( self, - request: search_service.SearchRequest = None, + request: Union[search_service.SearchRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -392,7 +392,7 @@ def search( sales if you are interested in using Retail Search. Args: - request (google.cloud.retail_v2.types.SearchRequest): + request (Union[google.cloud.retail_v2.types.SearchRequest, dict]): The request object. Request message for [SearchService.Search][google.cloud.retail.v2.SearchService.Search] method. diff --git a/google/cloud/retail_v2/services/search_service/transports/base.py b/google/cloud/retail_v2/services/search_service/transports/base.py index 91afda49..fb44bac5 100644 --- a/google/cloud/retail_v2/services/search_service/transports/base.py +++ b/google/cloud/retail_v2/services/search_service/transports/base.py @@ -115,7 +115,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/retail_v2/services/search_service/transports/grpc.py b/google/cloud/retail_v2/services/search_service/transports/grpc.py index c02af97c..d232fee8 100644 --- a/google/cloud/retail_v2/services/search_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/search_service/transports/grpc.py @@ -85,16 +85,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py index e0e2721d..681dfb40 100644 --- a/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/search_service/transports/grpc_asyncio.py @@ -132,16 +132,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/user_event_service/client.py b/google/cloud/retail_v2/services/user_event_service/client.py index 4bbe726a..f8b4ee18 100644 --- a/google/cloud/retail_v2/services/user_event_service/client.py +++ b/google/cloud/retail_v2/services/user_event_service/client.py @@ -17,7 +17,7 @@ from distutils import util import os import re -from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union +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 @@ -384,7 +384,7 @@ def __init__( def write_user_event( self, - request: user_event_service.WriteUserEventRequest = None, + request: Union[user_event_service.WriteUserEventRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -393,7 +393,7 @@ def write_user_event( r"""Writes a single user event. Args: - request (google.cloud.retail_v2.types.WriteUserEventRequest): + request (Union[google.cloud.retail_v2.types.WriteUserEventRequest, dict]): The request object. Request message for WriteUserEvent method. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -436,7 +436,7 @@ def write_user_event( def collect_user_event( self, - request: user_event_service.CollectUserEventRequest = None, + request: Union[user_event_service.CollectUserEventRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -450,7 +450,7 @@ def collect_user_event( method directly. Args: - request (google.cloud.retail_v2.types.CollectUserEventRequest): + request (Union[google.cloud.retail_v2.types.CollectUserEventRequest, dict]): The request object. Request message for CollectUserEvent method. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -534,7 +534,7 @@ def collect_user_event( def purge_user_events( self, - request: purge_config.PurgeUserEventsRequest = None, + request: Union[purge_config.PurgeUserEventsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -547,7 +547,7 @@ def purge_user_events( command first. Args: - request (google.cloud.retail_v2.types.PurgeUserEventsRequest): + request (Union[google.cloud.retail_v2.types.PurgeUserEventsRequest, dict]): The request object. Request message for PurgeUserEvents method. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -599,7 +599,7 @@ def purge_user_events( def import_user_events( self, - request: import_config.ImportUserEventsRequest = None, + request: Union[import_config.ImportUserEventsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -614,7 +614,7 @@ def import_user_events( ImportMetadata. Args: - request (google.cloud.retail_v2.types.ImportUserEventsRequest): + request (Union[google.cloud.retail_v2.types.ImportUserEventsRequest, dict]): The request object. Request message for the ImportUserEvents request. retry (google.api_core.retry.Retry): Designation of what errors, if any, @@ -668,7 +668,7 @@ def import_user_events( def rejoin_user_events( self, - request: user_event_service.RejoinUserEventsRequest = None, + request: Union[user_event_service.RejoinUserEventsRequest, dict] = None, *, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, @@ -686,7 +686,7 @@ def rejoin_user_events( catalog. Args: - request (google.cloud.retail_v2.types.RejoinUserEventsRequest): + request (Union[google.cloud.retail_v2.types.RejoinUserEventsRequest, dict]): The request object. Request message for RejoinUserEvents method. retry (google.api_core.retry.Retry): Designation of what errors, if any, diff --git a/google/cloud/retail_v2/services/user_event_service/transports/base.py b/google/cloud/retail_v2/services/user_event_service/transports/base.py index 7d820090..2ba27a08 100644 --- a/google/cloud/retail_v2/services/user_event_service/transports/base.py +++ b/google/cloud/retail_v2/services/user_event_service/transports/base.py @@ -121,7 +121,7 @@ def __init__( **scopes_kwargs, quota_project_id=quota_project_id ) - # If the credentials is service account credentials, then always try to use self signed JWT. + # If the credentials are service account credentials, then always try to use self signed JWT. if ( always_use_jwt_access and isinstance(credentials, service_account.Credentials) diff --git a/google/cloud/retail_v2/services/user_event_service/transports/grpc.py b/google/cloud/retail_v2/services/user_event_service/transports/grpc.py index 3f083d0a..21e77785 100644 --- a/google/cloud/retail_v2/services/user_event_service/transports/grpc.py +++ b/google/cloud/retail_v2/services/user_event_service/transports/grpc.py @@ -87,16 +87,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py b/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py index 0c127254..ac42c6bf 100644 --- a/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py +++ b/google/cloud/retail_v2/services/user_event_service/transports/grpc_asyncio.py @@ -134,16 +134,16 @@ def __init__( api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. If provided, it overrides the ``host`` argument and tries to create a mutual TLS channel with client SSL credentials from - ``client_cert_source`` or applicatin default SSL credentials. + ``client_cert_source`` or application default SSL credentials. client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): Deprecated. A callback to provide client SSL certificate bytes and private key bytes, both in PEM format. It is ignored if ``api_mtls_endpoint`` is None. ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials - for grpc channel. It is ignored if ``channel`` is provided. + for the grpc channel. It is ignored if ``channel`` is provided. client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): A callback to provide client certificate bytes and private key bytes, - both in PEM format. It is used to configure mutual TLS channel. It is + both in PEM format. It is used to configure a mutual TLS channel. It is ignored if ``channel`` or ``ssl_channel_credentials`` is provided. quota_project_id (Optional[str]): An optional project to use for billing and quota. diff --git a/scripts/fixup_retail_v2_keywords.py b/scripts/fixup_retail_v2_keywords.py index e0ddf763..5cc9231f 100644 --- a/scripts/fixup_retail_v2_keywords.py +++ b/scripts/fixup_retail_v2_keywords.py @@ -39,28 +39,28 @@ def partition( class retailCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'add_fulfillment_places': ('product', 'type_', 'place_ids', 'add_time', 'allow_missing', ), - 'collect_user_event': ('parent', 'user_event', 'uri', 'ets', ), - 'complete_query': ('catalog', 'query', 'visitor_id', 'language_codes', 'device_type', 'dataset', 'max_suggestions', ), - 'create_product': ('parent', 'product', 'product_id', ), - 'delete_product': ('name', ), - 'get_default_branch': ('catalog', ), - 'get_product': ('name', ), - 'import_completion_data': ('parent', 'input_config', 'notification_pubsub_topic', ), - 'import_products': ('parent', 'input_config', 'request_id', 'errors_config', 'update_mask', 'reconciliation_mode', 'notification_pubsub_topic', ), - 'import_user_events': ('parent', 'input_config', 'errors_config', ), - 'list_catalogs': ('parent', 'page_size', 'page_token', ), - 'list_products': ('parent', 'page_size', 'page_token', 'filter', 'read_mask', ), - 'predict': ('placement', 'user_event', 'page_size', 'page_token', 'filter', 'validate_only', 'params', 'labels', ), - 'purge_user_events': ('parent', 'filter', 'force', ), - 'rejoin_user_events': ('parent', 'user_event_rejoin_scope', ), - 'remove_fulfillment_places': ('product', 'type_', 'place_ids', 'remove_time', 'allow_missing', ), - 'search': ('placement', 'visitor_id', 'branch', 'query', 'user_info', 'page_size', 'page_token', 'offset', 'filter', 'canonical_filter', 'order_by', 'facet_specs', 'dynamic_facet_spec', 'boost_spec', 'query_expansion_spec', 'variant_rollup_keys', 'page_categories', ), - 'set_default_branch': ('catalog', 'branch_id', 'note', ), - 'set_inventory': ('inventory', 'set_mask', 'set_time', 'allow_missing', ), - 'update_catalog': ('catalog', 'update_mask', ), - 'update_product': ('product', 'update_mask', 'allow_missing', ), - 'write_user_event': ('parent', 'user_event', ), + 'add_fulfillment_places': ('product', 'type_', 'place_ids', 'add_time', 'allow_missing', ), + 'collect_user_event': ('parent', 'user_event', 'uri', 'ets', ), + 'complete_query': ('catalog', 'query', 'visitor_id', 'language_codes', 'device_type', 'dataset', 'max_suggestions', ), + 'create_product': ('parent', 'product', 'product_id', ), + 'delete_product': ('name', ), + 'get_default_branch': ('catalog', ), + 'get_product': ('name', ), + 'import_completion_data': ('parent', 'input_config', 'notification_pubsub_topic', ), + 'import_products': ('parent', 'input_config', 'request_id', 'errors_config', 'update_mask', 'reconciliation_mode', 'notification_pubsub_topic', ), + 'import_user_events': ('parent', 'input_config', 'errors_config', ), + 'list_catalogs': ('parent', 'page_size', 'page_token', ), + 'list_products': ('parent', 'page_size', 'page_token', 'filter', 'read_mask', ), + 'predict': ('placement', 'user_event', 'page_size', 'page_token', 'filter', 'validate_only', 'params', 'labels', ), + 'purge_user_events': ('parent', 'filter', 'force', ), + 'rejoin_user_events': ('parent', 'user_event_rejoin_scope', ), + 'remove_fulfillment_places': ('product', 'type_', 'place_ids', 'remove_time', 'allow_missing', ), + 'search': ('placement', 'visitor_id', 'branch', 'query', 'user_info', 'page_size', 'page_token', 'offset', 'filter', 'canonical_filter', 'order_by', 'facet_specs', 'dynamic_facet_spec', 'boost_spec', 'query_expansion_spec', 'variant_rollup_keys', 'page_categories', ), + 'set_default_branch': ('catalog', 'branch_id', 'note', ), + 'set_inventory': ('inventory', 'set_mask', 'set_time', 'allow_missing', ), + 'update_catalog': ('catalog', 'update_mask', ), + 'update_product': ('product', 'update_mask', 'allow_missing', ), + 'write_user_event': ('parent', 'user_event', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: @@ -79,7 +79,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: return updated kwargs, ctrl_kwargs = partition( - lambda a: not a.keyword.value in self.CTRL_PARAMS, + lambda a: a.keyword.value not in self.CTRL_PARAMS, kwargs )