class ProjectsLocationsProcessors extends Resource (View source)

The "processors" collection of methods.

Typical usage is:

 $documentaiService = new Google\Service\Document(...);
 $processors = $documentaiService->projects_locations_processors;

Methods

batchProcess(string $name, GoogleCloudDocumentaiV1BatchProcessRequest $postBody, array $optParams = [])

LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. (processors.batchProcess)

create(string $parent, GoogleCloudDocumentaiV1Processor $postBody, array $optParams = [])

Creates a processor from the ProcessorType provided. The processor will be at ENABLED state by default after its creation. Note that this method requires the documentai.processors.create permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

delete(string $name, array $optParams = [])

Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.

disable(string $name, GoogleCloudDocumentaiV1DisableProcessorRequest $postBody, array $optParams = [])

Disables a processor (processors.disable)

enable(string $name, GoogleCloudDocumentaiV1EnableProcessorRequest $postBody, array $optParams = [])

Enables a processor (processors.enable)

get(string $name, array $optParams = [])

Gets a processor detail. (processors.get)

listProjectsLocationsProcessors(string $parent, array $optParams = [])

Lists all processors which belong to this project.

process(string $name, GoogleCloudDocumentaiV1ProcessRequest $postBody, array $optParams = [])

Processes a single document. (processors.process)

setDefaultProcessorVersion(string $processor, GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest $postBody, array $optParams = [])

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

Details

GoogleLongrunningOperation batchProcess(string $name, GoogleCloudDocumentaiV1BatchProcessRequest $postBody, array $optParams = [])

LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. (processors.batchProcess)

Parameters

string $name

Required. The resource name of Processor or ProcessorVersion. Format: projects/{project}/locations/{location}/processors/{processor}, or project s/{project}/locations/{location}/processors/{processor}/processorVersions/{pr ocessorVersion}

GoogleCloudDocumentaiV1BatchProcessRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDocumentaiV1Processor create(string $parent, GoogleCloudDocumentaiV1Processor $postBody, array $optParams = [])

Creates a processor from the ProcessorType provided. The processor will be at ENABLED state by default after its creation. Note that this method requires the documentai.processors.create permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

(processors.create)

Parameters

string $parent

Required. The parent (project and location) under which to create the processor. Format: projects/{project}/locations/{location}

GoogleCloudDocumentaiV1Processor $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDocumentaiV1Processor

Exceptions

Exception

GoogleLongrunningOperation delete(string $name, array $optParams = [])

Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.

(processors.delete)

Parameters

string $name

Required. The processor resource name to be deleted.

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation disable(string $name, GoogleCloudDocumentaiV1DisableProcessorRequest $postBody, array $optParams = [])

Disables a processor (processors.disable)

Parameters

string $name

Required. The processor resource name to be disabled.

GoogleCloudDocumentaiV1DisableProcessorRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation enable(string $name, GoogleCloudDocumentaiV1EnableProcessorRequest $postBody, array $optParams = [])

Enables a processor (processors.enable)

Parameters

string $name

Required. The processor resource name to be enabled.

GoogleCloudDocumentaiV1EnableProcessorRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDocumentaiV1Processor get(string $name, array $optParams = [])

Gets a processor detail. (processors.get)

Parameters

string $name

Required. The processor resource name.

array $optParams

Optional parameters.

Return Value

GoogleCloudDocumentaiV1Processor

Exceptions

Exception

GoogleCloudDocumentaiV1ListProcessorsResponse listProjectsLocationsProcessors(string $parent, array $optParams = [])

Lists all processors which belong to this project.

(processors.listProjectsLocationsProcessors)

Parameters

string $parent

Required. The parent (project and location) which owns this collection of Processors. Format: projects/{project}/locations/{location}

array $optParams

Optional parameters.

Return Value

GoogleCloudDocumentaiV1ListProcessorsResponse

Exceptions

Exception

GoogleCloudDocumentaiV1ProcessResponse process(string $name, GoogleCloudDocumentaiV1ProcessRequest $postBody, array $optParams = [])

Processes a single document. (processors.process)

Parameters

string $name

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or project s/{project}/locations/{location}/processors/{processor}/processorVersions/{pr ocessorVersion}

GoogleCloudDocumentaiV1ProcessRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDocumentaiV1ProcessResponse

Exceptions

Exception

GoogleLongrunningOperation setDefaultProcessorVersion(string $processor, GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest $postBody, array $optParams = [])

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

(processors.setDefaultProcessorVersion)

Parameters

string $processor

Required. The resource name of the Processor to change default version.

GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception