Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: [DocumentAi] updated comments #7301

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
* LRO endpoint to batch process many documents. The output is written
* to Cloud Storage as JSON in the [Document] format.
*
* @param string $name The resource name of [Processor][google.cloud.documentai.v1.Processor] or
* @param string $name The resource name of
* [Processor][google.cloud.documentai.v1.Processor] or
* [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion].
* Format: `projects/{project}/locations/{location}/processors/{processor}`,
* or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
use Google\Cloud\DocumentAI\V1\Processor;

/**
* Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided.
* The processor will be at `ENABLED` state by default after its creation.
* Creates a processor from the
* [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The
* processor will be at `ENABLED` state by default after its creation.
*
* @param string $formattedParent The parent (project and location) under which to create the processor.
* Format: `projects/{project}/locations/{location}`
* @param string $formattedParent The parent (project and location) under which to create the
* processor. Format: `projects/{project}/locations/{location}`
* Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field.
*/
function create_processor_sample(string $formattedParent): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
* Evaluates a ProcessorVersion against annotated documents, producing an
* Evaluation.
*
* @param string $formattedProcessorVersion The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate.
* @param string $formattedProcessorVersion The resource name of the
* [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to
* evaluate.
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
* Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
use Google\Cloud\DocumentAI\V1\FetchProcessorTypesResponse;

/**
* Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
* Fetches processor types. Note that we don't use
* [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
* here, because it isn't paginated.
*
* @param string $formattedParent The location of processor types to list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
/**
* Retrieves a specific evaluation.
*
* @param string $formattedName The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get.
* @param string $formattedName The resource name of the
* [Evaluation][google.cloud.documentai.v1.Evaluation] to get.
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
* Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
/**
* Retrieves a set of evaluations for a given processor version.
*
* @param string $formattedParent The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for.
* @param string $formattedParent The resource name of the
* [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list
* evaluations for.
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
* Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
/**
* Lists all versions of a processor.
*
* @param string $formattedParent The parent (project, location and processor) to list all versions.
* Format: `projects/{project}/locations/{location}/processors/{processor}`
* @param string $formattedParent The parent (project, location and processor) to list all
* versions. Format:
* `projects/{project}/locations/{location}/processors/{processor}`
* Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field.
*/
function list_processor_versions_sample(string $formattedParent): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
/**
* Lists all processors which belong to this project.
*
* @param string $formattedParent The parent (project and location) which owns this collection of Processors.
* Format: `projects/{project}/locations/{location}`
* @param string $formattedParent The parent (project and location) which owns this collection of
* Processors. Format: `projects/{project}/locations/{location}`
* Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field.
*/
function list_processors_sample(string $formattedParent): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
/**
* Processes a single document.
*
* @param string $name The resource name of the [Processor][google.cloud.documentai.v1.Processor] or
* @param string $name The resource name of the
* [Processor][google.cloud.documentai.v1.Processor] or
* [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]
* to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use
* its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format:
* `projects/{project}/locations/{location}/processors/{processor}`, or
* to use for processing. If a
* [Processor][google.cloud.documentai.v1.Processor] is specified, the server
* will use its [default
* version][google.cloud.documentai.v1.Processor.default_processor_version].
* Format: `projects/{project}/locations/{location}/processors/{processor}`,
* or
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
*/
function process_document_sample(string $name): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
* Send a document for Human Review. The input document should be processed by
* the specified processor.
*
* @param string $formattedHumanReviewConfig The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be
* reviewed with. Please see
* @param string $formattedHumanReviewConfig The resource name of the
* [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the
* document will be reviewed with. Please see
* {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field.
*/
function review_document_sample(string $formattedHumanReviewConfig): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@
use Google\Rpc\Status;

/**
* Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in
* [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
* Set the default (active) version of a
* [Processor][google.cloud.documentai.v1.Processor] that will be used in
* [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
* and
* [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
*
* @param string $formattedProcessor The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. Please see
* @param string $formattedProcessor The resource name of the
* [Processor][google.cloud.documentai.v1.Processor] to change default
* version. Please see
* {@see DocumentProcessorServiceClient::processorName()} for help formatting this field.
* @param string $formattedDefaultProcessorVersion The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default.
* Format:
* @param string $formattedDefaultProcessorVersion The resource name of child
* [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as
* default. Format:
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}`
* Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
* Operation metadata is returned as
* [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata].
*
* @param string $formattedParent The parent (project, location and processor) to create the new version for.
* Format: `projects/{project}/locations/{location}/processors/{processor}`. Please see
* @param string $formattedParent The parent (project, location and processor) to create the new
* version for. Format:
* `projects/{project}/locations/{location}/processors/{processor}`. Please see
* {@see DocumentProcessorServiceClient::processorName()} for help formatting this field.
*/
function train_processor_version_sample(string $formattedParent): void
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions DocumentAi/src/V1/BatchProcessRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,9 @@ public function batchProcessDocuments(BatchProcessRequest $request, array $callO
}

/**
* Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided.
* The processor will be at `ENABLED` state by default after its creation.
* Creates a processor from the
* [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The
* processor will be at `ENABLED` state by default after its creation.
*
* The async variant is
* {@see DocumentProcessorServiceClient::createProcessorAsync()} .
Expand Down Expand Up @@ -629,7 +630,8 @@ public function evaluateProcessorVersion(EvaluateProcessorVersionRequest $reques
}

/**
* Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
* Fetches processor types. Note that we don't use
* [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes]
* here, because it isn't paginated.
*
* The async variant is
Expand Down Expand Up @@ -928,8 +930,10 @@ public function reviewDocument(ReviewDocumentRequest $request, array $callOption
}

/**
* Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in
* [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and
* Set the default (active) version of a
* [Processor][google.cloud.documentai.v1.Processor] that will be used in
* [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument]
* and
* [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].
*
* The async variant is
Expand Down
Loading
Loading