Googly. DocumentAI. Projects. Locations. Processors
(googly_document_ai v0.1.0)
Copy Markdown
View Source
Endpoints for the Projects.Locations.Processors resource.
Summary
Functions
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
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.
Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.
Disables a processor
Enables a processor
Gets a processor detail.
Lists all processors which belong to this project.
Processes a single document.
Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.
Functions
@spec batch_process( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleLongrunningOperation.t()} | {:error, term()}
LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
Parameters
-
name(type:String.t()) - Required. The resource name of Processor or ProcessorVersion. Format:projects/{project}/locations/{location}/processors/{processor}, orprojects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion} -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
body(type:Googly.DocumentAI.Model.GoogleCloudDocumentaiV1BatchProcessRequest.t()) -
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleLongrunningOperation{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec create( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleCloudDocumentaiV1Processor.t()} | {:error, term()}
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.
Parameters
-
parent(type:String.t()) - Required. The parent (project and location) under which to create the processor. Format:projects/{project}/locations/{location} -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
body(type:Googly.DocumentAI.Model.GoogleCloudDocumentaiV1Processor.t()) -
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleCloudDocumentaiV1Processor{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec delete( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleLongrunningOperation.t()} | {:error, term()}
Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.
Parameters
-
name(type:String.t()) - Required. The processor resource name to be deleted. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format.
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleLongrunningOperation{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec disable( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleLongrunningOperation.t()} | {:error, term()}
Disables a processor
Parameters
-
name(type:String.t()) - Required. The processor resource name to be disabled. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
body(type:Googly.DocumentAI.Model.GoogleCloudDocumentaiV1DisableProcessorRequest.t()) -
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleLongrunningOperation{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec enable( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleLongrunningOperation.t()} | {:error, term()}
Enables a processor
Parameters
-
name(type:String.t()) - Required. The processor resource name to be enabled. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
body(type:Googly.DocumentAI.Model.GoogleCloudDocumentaiV1EnableProcessorRequest.t()) -
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleLongrunningOperation{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec get( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleCloudDocumentaiV1Processor.t()} | {:error, term()}
Gets a processor detail.
Parameters
-
name(type:String.t()) - Required. The processor resource name. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format.
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleCloudDocumentaiV1Processor{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec list( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleCloudDocumentaiV1ListProcessorsResponse.t()} | {:error, term()}
Lists all processors which belong to this project.
Parameters
-
parent(type:String.t()) - Required. The parent (project and location) which owns this collection of Processors. Format:projects/{project}/locations/{location} -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
page_size(type:integer()) - The maximum number of processors to return. If unspecified, at most50processors will be returned. The maximum value is100. Values above100will be coerced to100. -
page_token(type:String.t()) - We will return the processors sorted by creation time. The page token will point to the next processor.
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleCloudDocumentaiV1ListProcessorsResponse{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec process( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleCloudDocumentaiV1ProcessResponse.t()} | {:error, term()}
Processes a single document.
Parameters
-
name(type:String.t()) - 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}, orprojects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion} -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
body(type:Googly.DocumentAI.Model.GoogleCloudDocumentaiV1ProcessRequest.t()) -
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleCloudDocumentaiV1ProcessResponse{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure
@spec set_default_processor_version( String.t(), keyword() ) :: {:ok, Googly.DocumentAI.Model.GoogleLongrunningOperation.t()} | {:error, term()}
Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.
Parameters
-
processor(type:String.t()) - Required. The resource name of the Processor to change default version. -
opts(type:keyword()) - Query and call options (:token, plus any of the below)-
access_token(type:String.t()) - OAuth access token. -
alt(type:String.t()) - Data format for response. -
callback(type:String.t()) - JSONP -
fields(type:String.t()) - Selector specifying which fields to include in a partial response. -
key(type:String.t()) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
oauth_token(type:String.t()) - OAuth 2.0 token for the current user. -
pretty_print(type:boolean()) - Returns response with indentations and line breaks. -
quota_user(type:String.t()) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
upload_protocol(type:String.t()) - Upload protocol for media (e.g. "raw", "multipart"). -
upload_type(type:String.t()) - Legacy upload protocol for media (e.g. "media", "multipart"). -
xgafv(type:String.t()) - V1 error format. -
body(type:Googly.DocumentAI.Model.GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest.t()) -
-
Returns
-
{:ok, %Googly.DocumentAI.Model.GoogleLongrunningOperation{}}on success -
{:error, %Googly.DocumentAI.Error{}}on failure