Skip to content

Commit 444836b

Browse files
feat(documentai): update the api
#### documentai:v1 The following keys were added: - schemas.GoogleCloudDocumentaiV1DeleteProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1DisableProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DisableProcessorResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1EnableProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1EnableProcessorResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1UndeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse (Total Keys: 2) #### documentai:v1beta2 The following keys were added: - schemas.GoogleCloudDocumentaiV1DeleteProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1DisableProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DisableProcessorResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1EnableProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1EnableProcessorResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1UndeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse (Total Keys: 2) #### documentai:v1beta3 The following keys were added: - resources.projects.resources.locations.resources.processors.methods.get (Total Keys: 11) - resources.projects.resources.locations.resources.processors.methods.setDefaultProcessorVersion (Total Keys: 12) - resources.projects.resources.locations.resources.processors.resources.processorVersions.methods.delete (Total Keys: 11) - resources.projects.resources.locations.resources.processors.resources.processorVersions.methods.deploy (Total Keys: 12) - resources.projects.resources.locations.resources.processors.resources.processorVersions.methods.get (Total Keys: 11) - resources.projects.resources.locations.resources.processors.resources.processorVersions.methods.list (Total Keys: 16) - resources.projects.resources.locations.resources.processors.resources.processorVersions.methods.undeploy (Total Keys: 12) - schemas.GoogleCloudDocumentaiV1DeleteProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1DisableProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1DisableProcessorResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1EnableProcessorMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1EnableProcessorResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1UndeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionRequest (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3EvaluationMetrics (Total Keys: 20) - schemas.GoogleCloudDocumentaiV1beta3EvaluationReference (Total Keys: 5) - schemas.GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse (Total Keys: 5) - schemas.GoogleCloudDocumentaiV1beta3ProcessorVersion (Total Keys: 9) - schemas.GoogleCloudDocumentaiV1beta3Schema (Total Keys: 13) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionRequest (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata (Total Keys: 3) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionRequest (Total Keys: 2) - schemas.GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse (Total Keys: 2)
1 parent 91d3250 commit 444836b

6 files changed

+1300
-5
lines changed

docs/dyn/documentai_v1beta3.projects.locations.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h3>Method Details</h3>
122122
{ # Response message for fetch processor types.
123123
&quot;processorTypes&quot;: [ # The list of processor types.
124124
{ # A processor type is responsible for performing a certain document understanding task on a certain type of document. All processor types are created by the documentai service internally. User will only list all available processor types via UI. For different users (projects), the available processor types may be different since we&#x27;ll expose the access of some types via EAP whitelisting. We make the ProcessorType a resource under location so we have a unified API and keep the possibility that UI will load different available processor types from different regions. But for alpha the behavior is that the user will always get the union of all available processor types among all regions no matter which regionalized endpoint is called, and then we use the &#x27;available_locations&#x27; field to show under which regions a processor type is available. For example, users can call either the &#x27;US&#x27; or &#x27;EU&#x27; endpoint to feach processor types. In the return, we will have an &#x27;invoice parsing&#x27; processor with &#x27;available_locations&#x27; field only containing &#x27;US&#x27;. So the user can try to create an &#x27;invoice parsing&#x27; processor under the location &#x27;US&#x27;. Such attempt of creating under the location &#x27;EU&#x27; will fail. Next ID: 8.
125-
&quot;allowCreation&quot;: True or False, # Whether the processor type allows creation. If yes, user can create a processor of this processor type. Otherwise, user needs to require for whitelisting.
125+
&quot;allowCreation&quot;: True or False, # Whether the processor type allows creation. If yes, user can create a processor of this processor type. Otherwise, user needs to request access.
126126
&quot;availableLocations&quot;: [ # The locations in which this processor is available.
127127
{ # The location information about where the processor is available.
128128
&quot;locationId&quot;: &quot;A String&quot;, # The location id, currently must be one of [us, eu].

docs/dyn/documentai_v1beta3.projects.locations.processors.html

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ <h2>Instance Methods</h2>
102102
<p class="toc_element">
103103
<code><a href="#enable">enable(name, body=None, x__xgafv=None)</a></code></p>
104104
<p class="firstline">Enables a processor</p>
105+
<p class="toc_element">
106+
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
107+
<p class="firstline">Gets a processor detail.</p>
105108
<p class="toc_element">
106109
<code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
107110
<p class="firstline">Lists all processors which belong to this project.</p>
@@ -111,6 +114,9 @@ <h2>Instance Methods</h2>
111114
<p class="toc_element">
112115
<code><a href="#process">process(name, body=None, x__xgafv=None)</a></code></p>
113116
<p class="firstline">Processes a single document.</p>
117+
<p class="toc_element">
118+
<code><a href="#setDefaultProcessorVersion">setDefaultProcessorVersion(processor, body=None, x__xgafv=None)</a></code></p>
119+
<p class="firstline">Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.</p>
114120
<h3>Method Details</h3>
115121
<div class="method">
116122
<code class="details" id="batchProcess">batchProcess(name, body=None, x__xgafv=None)</code>
@@ -343,6 +349,32 @@ <h3>Method Details</h3>
343349
}</pre>
344350
</div>
345351

352+
<div class="method">
353+
<code class="details" id="get">get(name, x__xgafv=None)</code>
354+
<pre>Gets a processor detail.
355+
356+
Args:
357+
name: string, Required. The processor resource name. (required)
358+
x__xgafv: string, V1 error format.
359+
Allowed values
360+
1 - v1 error format
361+
2 - v2 error format
362+
363+
Returns:
364+
An object of the form:
365+
366+
{ # The first-class citizen for DAI. Each processor defines how to extract structural information from a document.
367+
&quot;createTime&quot;: &quot;A String&quot;, # The time the processor was created.
368+
&quot;defaultProcessorVersion&quot;: &quot;A String&quot;, # The default processor version.
369+
&quot;displayName&quot;: &quot;A String&quot;, # The display name of the processor.
370+
&quot;kmsKeyName&quot;: &quot;A String&quot;, # The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.
371+
&quot;name&quot;: &quot;A String&quot;, # Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}
372+
&quot;processEndpoint&quot;: &quot;A String&quot;, # Output only. Immutable. The http endpoint that can be called to invoke processing.
373+
&quot;state&quot;: &quot;A String&quot;, # Output only. The state of the processor.
374+
&quot;type&quot;: &quot;A String&quot;, # The processor type, e.g., INVOICE_PARSING, W2_PARSING, etc.
375+
}</pre>
376+
</div>
377+
346378
<div class="method">
347379
<code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
348380
<pre>Lists all processors which belong to this project.
@@ -2588,4 +2620,46 @@ <h3>Method Details</h3>
25882620
}</pre>
25892621
</div>
25902622

2623+
<div class="method">
2624+
<code class="details" id="setDefaultProcessorVersion">setDefaultProcessorVersion(processor, body=None, x__xgafv=None)</code>
2625+
<pre>Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.
2626+
2627+
Args:
2628+
processor: string, Required. The resource name of the Processor to change default version. (required)
2629+
body: object, The request body.
2630+
The object takes the form of:
2631+
2632+
{ # Request message for the set default processor version method.
2633+
&quot;defaultProcessorVersion&quot;: &quot;A String&quot;, # Required. The resource name of child ProcessorVersion to use as default.
2634+
}
2635+
2636+
x__xgafv: string, V1 error format.
2637+
Allowed values
2638+
1 - v1 error format
2639+
2 - v2 error format
2640+
2641+
Returns:
2642+
An object of the form:
2643+
2644+
{ # This resource represents a long-running operation that is the result of a network API call.
2645+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
2646+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
2647+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2648+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2649+
{
2650+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2651+
},
2652+
],
2653+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
2654+
},
2655+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
2656+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2657+
},
2658+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
2659+
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
2660+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2661+
},
2662+
}</pre>
2663+
</div>
2664+
25912665
</body></html>

0 commit comments

Comments
 (0)