processor_versions
Creates, updates, deletes, gets or lists a processor_versions
resource.
Overview
Name | processor_versions |
Type | Resource |
Id | google.documentai.processor_versions |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_processors_processor_versions_get
- projects_locations_processors_processor_versions_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the processor version. Format: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version} |
createTime | string (google-datetime) | Output only. The time the processor version was created. |
deprecationInfo | object | Output only. If set, information about the eventual deprecation of this version. (id: GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo) |
displayName | string | The display name of the processor version. |
documentSchema | object | Output only. The schema of the processor version. Describes the output. (id: GoogleCloudDocumentaiV1DocumentSchema) |
genAiModelInfo | object | Output only. Information about Generative AI model-based processor versions. (id: GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo) |
googleManaged | boolean | Output only. Denotes that this ProcessorVersion is managed by Google. |
kmsKeyName | string | Output only. The KMS key name used for encryption. |
kmsKeyVersionName | string | Output only. The KMS key version with which data is encrypted. |
latestEvaluation | object | Output only. The most recently invoked evaluation for the processor version. (id: GoogleCloudDocumentaiV1EvaluationReference) |
modelType | string | Output only. The model type of this processor version. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
state | string | Output only. The state of the processor version. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the processor version. Format: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version} |
createTime | string (google-datetime) | Output only. The time the processor version was created. |
deprecationInfo | object | Output only. If set, information about the eventual deprecation of this version. (id: GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo) |
displayName | string | The display name of the processor version. |
documentSchema | object | Output only. The schema of the processor version. Describes the output. (id: GoogleCloudDocumentaiV1DocumentSchema) |
genAiModelInfo | object | Output only. Information about Generative AI model-based processor versions. (id: GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo) |
googleManaged | boolean | Output only. Denotes that this ProcessorVersion is managed by Google. |
kmsKeyName | string | Output only. The KMS key name used for encryption. |
kmsKeyVersionName | string | Output only. The KMS key version with which data is encrypted. |
latestEvaluation | object | Output only. The most recently invoked evaluation for the processor version. (id: GoogleCloudDocumentaiV1EvaluationReference) |
modelType | string | Output only. The model type of this processor version. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
state | string | Output only. The state of the processor version. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
processorVersionsId | string | |
processorsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_locations_processors_processor_versions_get
- projects_locations_processors_processor_versions_list
Gets a processor version detail.
SELECT
name,
createTime,
deprecationInfo,
displayName,
documentSchema,
genAiModelInfo,
googleManaged,
kmsKeyName,
kmsKeyVersionName,
latestEvaluation,
modelType,
satisfiesPzi,
satisfiesPzs,
state
FROM google.documentai.processor_versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND processorsId = '{{ processorsId }}' -- required
AND processorVersionsId = '{{ processorVersionsId }}' -- required;
Lists all versions of a processor.
SELECT
name,
createTime,
deprecationInfo,
displayName,
documentSchema,
genAiModelInfo,
googleManaged,
kmsKeyName,
kmsKeyVersionName,
latestEvaluation,
modelType,
satisfiesPzi,
satisfiesPzs,
state
FROM google.documentai.processor_versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND processorsId = '{{ processorsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
DELETE
examples
- projects_locations_processors_processor_versions_delete
Deletes the processor version, all artifacts under the processor version will be deleted.
DELETE FROM google.documentai.processor_versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND processorsId = '{{ processorsId }}' --required
AND processorVersionsId = '{{ processorVersionsId }}' --required;
Lifecycle Methods
- projects_locations_processors_processor_versions_process
- projects_locations_processors_processor_versions_batch_process
- projects_locations_processors_processor_versions_train
- projects_locations_processors_processor_versions_deploy
- projects_locations_processors_processor_versions_undeploy
- projects_locations_processors_processor_versions_evaluate_processor_version
Processes a single document.
EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_process
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required,
@processorVersionsId='{{ processorVersionsId }}' --required
@@json=
'{
"inlineDocument": "{{ inlineDocument }}",
"rawDocument": "{{ rawDocument }}",
"gcsDocument": "{{ gcsDocument }}",
"skipHumanReview": {{ skipHumanReview }},
"fieldMask": "{{ fieldMask }}",
"processOptions": "{{ processOptions }}",
"labels": "{{ labels }}",
"imagelessMode": {{ imagelessMode }}
}';
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_batch_process
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required,
@processorVersionsId='{{ processorVersionsId }}' --required
@@json=
'{
"inputDocuments": "{{ inputDocuments }}",
"documentOutputConfig": "{{ documentOutputConfig }}",
"skipHumanReview": {{ skipHumanReview }},
"processOptions": "{{ processOptions }}",
"labels": "{{ labels }}"
}';
Trains a new processor version. Operation metadata is returned as TrainProcessorVersionMetadata.
EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_train
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required
@@json=
'{
"customDocumentExtractionOptions": "{{ customDocumentExtractionOptions }}",
"foundationModelTuningOptions": "{{ foundationModelTuningOptions }}",
"processorVersion": "{{ processorVersion }}",
"documentSchema": "{{ documentSchema }}",
"inputData": "{{ inputData }}",
"baseProcessorVersion": "{{ baseProcessorVersion }}"
}';
Deploys the processor version.
EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_deploy
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required,
@processorVersionsId='{{ processorVersionsId }}' --required;
Undeploys the processor version.
EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_undeploy
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required,
@processorVersionsId='{{ processorVersionsId }}' --required;
Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.
EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_evaluate_processor_version
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required,
@processorVersionsId='{{ processorVersionsId }}' --required
@@json=
'{
"evaluationDocuments": "{{ evaluationDocuments }}"
}';