Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#216)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: add 'dict' annotation type to 'request'

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent b881185 commit a95fac8
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 52 deletions.
Expand Up @@ -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
Expand Down Expand Up @@ -377,7 +377,7 @@ def __init__(

def process_document(
self,
request: document_processor_service.ProcessRequest = None,
request: Union[document_processor_service.ProcessRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -387,7 +387,7 @@ def process_document(
r"""Processes a single document.
Args:
request (google.cloud.documentai_v1.types.ProcessRequest):
request (Union[google.cloud.documentai_v1.types.ProcessRequest, dict]):
The request object. Request message for the process
document method.
name (str):
Expand Down Expand Up @@ -448,7 +448,7 @@ def process_document(

def batch_process_documents(
self,
request: document_processor_service.BatchProcessRequest = None,
request: Union[document_processor_service.BatchProcessRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -459,7 +459,7 @@ def batch_process_documents(
written to Cloud Storage as JSON in the [Document] format.
Args:
request (google.cloud.documentai_v1.types.BatchProcessRequest):
request (Union[google.cloud.documentai_v1.types.BatchProcessRequest, dict]):
The request object. Request message for batch process
document method.
name (str):
Expand Down Expand Up @@ -531,7 +531,7 @@ def batch_process_documents(

def review_document(
self,
request: document_processor_service.ReviewDocumentRequest = None,
request: Union[document_processor_service.ReviewDocumentRequest, dict] = None,
*,
human_review_config: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -542,7 +542,7 @@ def review_document(
should be processed by the specified processor.
Args:
request (google.cloud.documentai_v1.types.ReviewDocumentRequest):
request (Union[google.cloud.documentai_v1.types.ReviewDocumentRequest, dict]):
The request object. Request message for review document
method.
human_review_config (str):
Expand Down
Expand Up @@ -119,7 +119,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)
Expand Down
Expand Up @@ -86,16 +86,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.
Expand Down
Expand Up @@ -133,16 +133,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.
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -348,7 +348,9 @@ def __init__(

def batch_process_documents(
self,
request: document_understanding.BatchProcessDocumentsRequest = None,
request: Union[
document_understanding.BatchProcessDocumentsRequest, dict
] = None,
*,
requests: Sequence[document_understanding.ProcessDocumentRequest] = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -359,7 +361,7 @@ def batch_process_documents(
written to Cloud Storage as JSON in the [Document] format.
Args:
request (google.cloud.documentai_v1beta2.types.BatchProcessDocumentsRequest):
request (Union[google.cloud.documentai_v1beta2.types.BatchProcessDocumentsRequest, dict]):
The request object. Request to batch process documents
as an asynchronous operation. The output is written to
Cloud Storage as JSON in the [Document] format.
Expand Down Expand Up @@ -431,7 +433,7 @@ def batch_process_documents(

def process_document(
self,
request: document_understanding.ProcessDocumentRequest = None,
request: Union[document_understanding.ProcessDocumentRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -440,7 +442,7 @@ def process_document(
r"""Processes a single document.
Args:
request (google.cloud.documentai_v1beta2.types.ProcessDocumentRequest):
request (Union[google.cloud.documentai_v1beta2.types.ProcessDocumentRequest, dict]):
The request object. Request to process one document.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down
Expand Up @@ -120,7 +120,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)
Expand Down
Expand Up @@ -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.
Expand Down
Expand Up @@ -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.
Expand Down
Expand Up @@ -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
Expand Down Expand Up @@ -399,7 +399,7 @@ def __init__(

def process_document(
self,
request: document_processor_service.ProcessRequest = None,
request: Union[document_processor_service.ProcessRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -409,7 +409,7 @@ def process_document(
r"""Processes a single document.
Args:
request (google.cloud.documentai_v1beta3.types.ProcessRequest):
request (Union[google.cloud.documentai_v1beta3.types.ProcessRequest, dict]):
The request object. Request message for the process
document method.
name (str):
Expand Down Expand Up @@ -470,7 +470,7 @@ def process_document(

def batch_process_documents(
self,
request: document_processor_service.BatchProcessRequest = None,
request: Union[document_processor_service.BatchProcessRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -481,7 +481,7 @@ def batch_process_documents(
written to Cloud Storage as JSON in the [Document] format.
Args:
request (google.cloud.documentai_v1beta3.types.BatchProcessRequest):
request (Union[google.cloud.documentai_v1beta3.types.BatchProcessRequest, dict]):
The request object. Request message for batch process
document method.
name (str):
Expand Down Expand Up @@ -553,7 +553,9 @@ def batch_process_documents(

def fetch_processor_types(
self,
request: document_processor_service.FetchProcessorTypesRequest = None,
request: Union[
document_processor_service.FetchProcessorTypesRequest, dict
] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -563,7 +565,7 @@ def fetch_processor_types(
r"""Fetches processor types.
Args:
request (google.cloud.documentai_v1beta3.types.FetchProcessorTypesRequest):
request (Union[google.cloud.documentai_v1beta3.types.FetchProcessorTypesRequest, dict]):
The request object. Request message for fetch processor
types.
parent (str):
Expand Down Expand Up @@ -627,7 +629,7 @@ def fetch_processor_types(

def list_processors(
self,
request: document_processor_service.ListProcessorsRequest = None,
request: Union[document_processor_service.ListProcessorsRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -637,7 +639,7 @@ def list_processors(
r"""Lists all processors which belong to this project.
Args:
request (google.cloud.documentai_v1beta3.types.ListProcessorsRequest):
request (Union[google.cloud.documentai_v1beta3.types.ListProcessorsRequest, dict]):
The request object. Request message for list all
processors belongs to a project.
parent (str):
Expand Down Expand Up @@ -708,7 +710,7 @@ def list_processors(

def create_processor(
self,
request: document_processor_service.CreateProcessorRequest = None,
request: Union[document_processor_service.CreateProcessorRequest, dict] = None,
*,
parent: str = None,
processor: gcd_processor.Processor = None,
Expand All @@ -721,7 +723,7 @@ def create_processor(
default after its creation.
Args:
request (google.cloud.documentai_v1beta3.types.CreateProcessorRequest):
request (Union[google.cloud.documentai_v1beta3.types.CreateProcessorRequest, dict]):
The request object. Request message for create a
processor. Notice this request is sent to a regionalized
backend service, and if the processor type is not
Expand Down Expand Up @@ -798,7 +800,7 @@ def create_processor(

def delete_processor(
self,
request: document_processor_service.DeleteProcessorRequest = None,
request: Union[document_processor_service.DeleteProcessorRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -810,7 +812,7 @@ def delete_processor(
artifacts associated with this processor.
Args:
request (google.cloud.documentai_v1beta3.types.DeleteProcessorRequest):
request (Union[google.cloud.documentai_v1beta3.types.DeleteProcessorRequest, dict]):
The request object. Request message for the delete
processor method.
name (str):
Expand Down Expand Up @@ -892,7 +894,7 @@ def delete_processor(

def enable_processor(
self,
request: document_processor_service.EnableProcessorRequest = None,
request: Union[document_processor_service.EnableProcessorRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -901,7 +903,7 @@ def enable_processor(
r"""Enables a processor
Args:
request (google.cloud.documentai_v1beta3.types.EnableProcessorRequest):
request (Union[google.cloud.documentai_v1beta3.types.EnableProcessorRequest, dict]):
The request object. Request message for the enable
processor method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -953,7 +955,7 @@ def enable_processor(

def disable_processor(
self,
request: document_processor_service.DisableProcessorRequest = None,
request: Union[document_processor_service.DisableProcessorRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -962,7 +964,7 @@ def disable_processor(
r"""Disables a processor
Args:
request (google.cloud.documentai_v1beta3.types.DisableProcessorRequest):
request (Union[google.cloud.documentai_v1beta3.types.DisableProcessorRequest, dict]):
The request object. Request message for the disable
processor method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1014,7 +1016,7 @@ def disable_processor(

def review_document(
self,
request: document_processor_service.ReviewDocumentRequest = None,
request: Union[document_processor_service.ReviewDocumentRequest, dict] = None,
*,
human_review_config: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1025,7 +1027,7 @@ def review_document(
should be processed by the specified processor.
Args:
request (google.cloud.documentai_v1beta3.types.ReviewDocumentRequest):
request (Union[google.cloud.documentai_v1beta3.types.ReviewDocumentRequest, dict]):
The request object. Request message for review document
method. Next Id: 6.
human_review_config (str):
Expand Down
Expand Up @@ -120,7 +120,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)
Expand Down

0 comments on commit a95fac8

Please sign in to comment.