Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.2 (#275)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.63.2

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 11, 2022
1 parent 47b790e commit b2a763a
Show file tree
Hide file tree
Showing 37 changed files with 650 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def sample_process_document():
# Make the request
response = client.process_document(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -358,6 +358,8 @@ def sample_batch_process_documents():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -477,6 +479,8 @@ def sample_review_document():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def sample_process_document():
# Make the request
response = client.process_document(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -552,6 +552,8 @@ def sample_batch_process_documents():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -662,6 +664,8 @@ def sample_review_document():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,34 @@ async def batch_process_documents(
r"""LRO endpoint to batch process many documents. The output is
written to Cloud Storage as JSON in the [Document] format.
.. code-block::
from google.cloud import documentai_v1beta2
def sample_batch_process_documents():
# Create a client
client = documentai_v1beta2.DocumentUnderstandingServiceClient()
# Initialize request argument(s)
requests = documentai_v1beta2.ProcessDocumentRequest()
requests.input_config.gcs_source.uri = "uri_value"
requests.input_config.mime_type = "mime_type_value"
request = documentai_v1beta2.BatchProcessDocumentsRequest(
requests=requests,
)
# Make the request
operation = client.batch_process_documents(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.documentai_v1beta2.types.BatchProcessDocumentsRequest, dict]):
The request object. Request to batch process documents
Expand Down Expand Up @@ -318,6 +346,29 @@ async def process_document(
) -> document.Document:
r"""Processes a single document.
.. code-block::
from google.cloud import documentai_v1beta2
def sample_process_document():
# Create a client
client = documentai_v1beta2.DocumentUnderstandingServiceClient()
# Initialize request argument(s)
input_config = documentai_v1beta2.InputConfig()
input_config.gcs_source.uri = "uri_value"
input_config.mime_type = "mime_type_value"
request = documentai_v1beta2.ProcessDocumentRequest(
input_config=input_config,
)
# Make the request
response = client.process_document(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.documentai_v1beta2.types.ProcessDocumentRequest, dict]):
The request object. Request to process one document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,35 @@ def batch_process_documents(
r"""LRO endpoint to batch process many documents. The output is
written to Cloud Storage as JSON in the [Document] format.
.. code-block::
from google.cloud import documentai_v1beta2
def sample_batch_process_documents():
# Create a client
client = documentai_v1beta2.DocumentUnderstandingServiceClient()
# Initialize request argument(s)
requests = documentai_v1beta2.ProcessDocumentRequest()
requests.input_config.gcs_source.uri = "uri_value"
requests.input_config.mime_type = "mime_type_value"
request = documentai_v1beta2.BatchProcessDocumentsRequest(
requests=requests,
)
# Make the request
operation = client.batch_process_documents(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.documentai_v1beta2.types.BatchProcessDocumentsRequest, dict]):
The request object. Request to batch process documents
Expand Down Expand Up @@ -490,6 +519,30 @@ def process_document(
) -> document.Document:
r"""Processes a single document.
.. code-block::
from google.cloud import documentai_v1beta2
def sample_process_document():
# Create a client
client = documentai_v1beta2.DocumentUnderstandingServiceClient()
# Initialize request argument(s)
input_config = documentai_v1beta2.InputConfig()
input_config.gcs_source.uri = "uri_value"
input_config.mime_type = "mime_type_value"
request = documentai_v1beta2.ProcessDocumentRequest(
input_config=input_config,
)
# Make the request
response = client.process_document(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.documentai_v1beta2.types.ProcessDocumentRequest, dict]):
The request object. Request to process one document.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def sample_process_document():
# Make the request
response = client.process_document(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -370,6 +370,8 @@ def sample_batch_process_documents():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -482,7 +484,7 @@ def sample_fetch_processor_types():
# Make the request
response = client.fetch_processor_types(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -572,6 +574,8 @@ def sample_list_processors():
# Make the request
page_result = client.list_processors(request=request)
# Handle the response
for response in page_result:
print(response)
Expand Down Expand Up @@ -676,7 +680,7 @@ def sample_create_processor():
# Make the request
response = client.create_processor(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -788,6 +792,8 @@ def sample_delete_processor():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -900,6 +906,8 @@ def sample_enable_processor():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -981,6 +989,8 @@ def sample_disable_processor():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -1069,6 +1079,8 @@ def sample_review_document():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def sample_process_document():
# Make the request
response = client.process_document(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -574,6 +574,8 @@ def sample_batch_process_documents():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -677,7 +679,7 @@ def sample_fetch_processor_types():
# Make the request
response = client.fetch_processor_types(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -770,6 +772,8 @@ def sample_list_processors():
# Make the request
page_result = client.list_processors(request=request)
# Handle the response
for response in page_result:
print(response)
Expand Down Expand Up @@ -875,7 +879,7 @@ def sample_create_processor():
# Make the request
response = client.create_processor(request=request)
# Handle response
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -988,6 +992,8 @@ def sample_delete_processor():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -1101,6 +1107,8 @@ def sample_enable_processor():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -1184,6 +1192,8 @@ def sample_disable_processor():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down Expand Up @@ -1274,6 +1284,8 @@ def sample_review_document():
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ async def sample_batch_process_documents():
print("Waiting for operation to complete...")

response = await operation.result()

# Handle the response
print(response)

# [END documentai_generated_documentai_v1_DocumentProcessorService_BatchProcessDocuments_async]
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def sample_batch_process_documents():
print("Waiting for operation to complete...")

response = operation.result()

# Handle the response
print(response)

# [END documentai_generated_documentai_v1_DocumentProcessorService_BatchProcessDocuments_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def sample_process_document():
# Make the request
response = await client.process_document(request=request)

# Handle response
# Handle the response
print(response)

# [END documentai_generated_documentai_v1_DocumentProcessorService_ProcessDocument_async]
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def sample_process_document():
# Make the request
response = client.process_document(request=request)

# Handle response
# Handle the response
print(response)

# [END documentai_generated_documentai_v1_DocumentProcessorService_ProcessDocument_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ async def sample_review_document():
print("Waiting for operation to complete...")

response = await operation.result()

# Handle the response
print(response)

# [END documentai_generated_documentai_v1_DocumentProcessorService_ReviewDocument_async]
Loading

0 comments on commit b2a763a

Please sign in to comment.