Debian Codegraph @

docs/dyn/contentwarehouse_v1.projects.locations.documents.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="contentwarehouse_v1.html">Document AI Warehouse API</a> . <a href="contentwarehouse_v1.projects.html">projects</a> . <a href="contentwarehouse_v1.projects.locations.html">locations</a> . <a href="contentwarehouse_v1.projects.locations.documents.html">documents</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="contentwarehouse_v1.projects.locations.documents.documentLinks.html">documentLinks()</a></code>
79 </p>
80 <p class="firstline">Returns the documentLinks Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="contentwarehouse_v1.projects.locations.documents.referenceId.html">referenceId()</a></code>
84 </p>
85 <p class="firstline">Returns the referenceId Resource.</p>
86
87 <p class="toc_element">
88 <code><a href="#close">close()</a></code></p>
89 <p class="firstline">Close httplib2 connections.</p>
90 <p class="toc_element">
91 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
92 <p class="firstline">Creates a document.</p>
93 <p class="toc_element">
94 <code><a href="#delete">delete(name, body=None, x__xgafv=None)</a></code></p>
95 <p class="firstline">Deletes a document. Returns NOT_FOUND if the document does not exist.</p>
96 <p class="toc_element">
97 <code><a href="#fetchAcl">fetchAcl(resource, body=None, x__xgafv=None)</a></code></p>
98 <p class="firstline">Gets the access control policy for a resource. Returns NOT_FOUND error if the resource does not exist. Returns an empty policy if the resource exists but does not have a policy set.</p>
99 <p class="toc_element">
100 <code><a href="#get">get(name, body=None, x__xgafv=None)</a></code></p>
101 <p class="firstline">Gets a document. Returns NOT_FOUND if the document does not exist.</p>
102 <p class="toc_element">
103 <code><a href="#linkedSources">linkedSources(parent, body=None, x__xgafv=None)</a></code></p>
104 <p class="firstline">Return all source document-links from the document.</p>
105 <p class="toc_element">
106 <code><a href="#linkedSources_next">linkedSources_next()</a></code></p>
107 <p class="firstline">Retrieves the next page of results.</p>
108 <p class="toc_element">
109 <code><a href="#linkedTargets">linkedTargets(parent, body=None, x__xgafv=None)</a></code></p>
110 <p class="firstline">Return all target document-links from the document.</p>
111 <p class="toc_element">
112 <code><a href="#lock">lock(name, body=None, x__xgafv=None)</a></code></p>
113 <p class="firstline">Lock the document so the document cannot be updated by other users.</p>
114 <p class="toc_element">
115 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
116 <p class="firstline">Updates a document. Returns INVALID_ARGUMENT if the name of the document is non-empty and does not equal the existing name.</p>
117 <p class="toc_element">
118 <code><a href="#search">search(parent, body=None, x__xgafv=None)</a></code></p>
119 <p class="firstline">Searches for documents using provided SearchDocumentsRequest. This call only returns documents that the caller has permission to search against.</p>
120 <p class="toc_element">
121 <code><a href="#search_next">search_next()</a></code></p>
122 <p class="firstline">Retrieves the next page of results.</p>
123 <p class="toc_element">
124 <code><a href="#setAcl">setAcl(resource, body=None, x__xgafv=None)</a></code></p>
125 <p class="firstline">Sets the access control policy for a resource. Replaces any existing policy.</p>
126 <h3>Method Details</h3>
127 <div class="method">
128 <code class="details" id="close">close()</code>
129 <pre>Close httplib2 connections.</pre>
130 </div>
131
132 <div class="method">
133 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
134 <pre>Creates a document.
135
136 Args:
137 parent: string, Required. The parent name. Format: projects/{project_number}/locations/{location}. (required)
138 body: object, The request body.
139 The object takes the form of:
140
141 { # Request message for DocumentService.CreateDocument.
142 &quot;cloudAiDocumentOption&quot;: { # Request Option for processing Cloud AI Document in CW Document. # Request Option for processing Cloud AI Document in Document Warehouse. This field offers limited support for mapping entities from Cloud AI Document to Warehouse Document. Please consult with product team before using this field and other available options.
143 &quot;customizedEntitiesPropertiesConversions&quot;: { # If set, only selected entities will be converted to properties.
144 &quot;a_key&quot;: &quot;A String&quot;,
145 },
146 &quot;enableEntitiesConversions&quot;: True or False, # Whether to convert all the entities to properties.
147 },
148 &quot;createMask&quot;: &quot;A String&quot;, # Field mask for creating Document fields. If mask path is empty, it means all fields are masked. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
149 &quot;document&quot;: { # Defines the structure for content warehouse document proto. # Required. The document to create.
150 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
151 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
152 &quot;chunks&quot;: [ # List of chunks.
153 { # Represents a chunk.
154 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
155 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
156 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
157 { # Represents the page footer associated with the chunk.
158 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
159 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
160 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
161 },
162 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
163 },
164 ],
165 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
166 { # Represents the page header associated with the chunk.
167 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
168 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
169 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
170 },
171 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
172 },
173 ],
174 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
175 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
176 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
177 },
178 &quot;sourceBlockIds&quot;: [ # Unused.
179 &quot;A String&quot;,
180 ],
181 },
182 ],
183 },
184 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
185 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
186 &quot;blocks&quot;: [ # List of blocks in the document.
187 { # Represents a block. A block could be one of the various types (text, table, list) supported.
188 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
189 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
190 &quot;listEntries&quot;: [ # List entries that constitute a list block.
191 { # Represents an entry in the list.
192 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
193 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
194 ],
195 },
196 ],
197 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
198 },
199 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
200 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
201 &quot;pageStart&quot;: 42, # Page where block starts in the document.
202 },
203 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
204 &quot;bodyRows&quot;: [ # Body rows containing main table content.
205 { # Represents a row in a table.
206 &quot;cells&quot;: [ # A table row is a list of table cells.
207 { # Represents a cell in a table row.
208 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
209 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
210 ],
211 &quot;colSpan&quot;: 42, # How many columns this cell spans.
212 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
213 },
214 ],
215 },
216 ],
217 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
218 &quot;headerRows&quot;: [ # Header rows at the top of the table.
219 { # Represents a row in a table.
220 &quot;cells&quot;: [ # A table row is a list of table cells.
221 { # Represents a cell in a table row.
222 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
223 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
224 ],
225 &quot;colSpan&quot;: 42, # How many columns this cell spans.
226 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
227 },
228 ],
229 },
230 ],
231 },
232 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
233 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
234 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
235 ],
236 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
237 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
238 },
239 },
240 ],
241 },
242 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
243 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
244 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
245 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
246 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
247 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
248 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
249 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
250 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
251 &quot;A String&quot;,
252 ],
253 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
254 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
255 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
256 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
257 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
258 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
259 &quot;A String&quot;,
260 ],
261 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
262 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
263 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
264 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
265 },
266 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
267 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
268 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
269 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
270 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
271 },
272 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
273 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
274 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
275 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
276 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
277 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
278 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
279 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
280 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
281 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
282 },
283 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
284 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
285 },
286 &quot;floatValue&quot;: 3.14, # Float value.
287 &quot;integerValue&quot;: 42, # Integer value.
288 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
289 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
290 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
291 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
292 },
293 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
294 },
295 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
296 &quot;pageRefs&quot;: [ # One or more references to visual page elements
297 { # Represents a weak reference to a page element within a document.
298 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
299 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
300 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
301 &quot;x&quot;: 3.14, # X coordinate.
302 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
303 },
304 ],
305 &quot;vertices&quot;: [ # The bounding polygon vertices.
306 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
307 &quot;x&quot;: 42, # X coordinate.
308 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
309 },
310 ],
311 },
312 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
313 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
314 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
315 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
316 },
317 ],
318 },
319 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
320 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
321 ],
322 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
323 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
324 &quot;parents&quot;: [ # References to the original elements that are replaced.
325 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
326 &quot;id&quot;: 42, # The id of the parent provenance.
327 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
328 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
329 },
330 ],
331 &quot;revision&quot;: 42, # The index of the revision that produced this element.
332 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
333 },
334 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
335 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
336 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
337 &quot;textSegments&quot;: [ # The text segments from the Document.text.
338 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
339 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
340 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
341 },
342 ],
343 },
344 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
345 },
346 ],
347 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
348 { # Relationship between Entities.
349 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
350 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
351 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
352 },
353 ],
354 &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). # Any error that occurred while processing this document.
355 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
356 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
357 {
358 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
359 },
360 ],
361 &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.
362 },
363 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
364 &quot;pages&quot;: [ # Visual page layout for the Document.
365 { # A page in a Document.
366 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
367 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
368 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
369 { # Detected language for a structural component.
370 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
371 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
372 },
373 ],
374 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
375 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
376 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
377 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
378 &quot;x&quot;: 3.14, # X coordinate.
379 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
380 },
381 ],
382 &quot;vertices&quot;: [ # The bounding polygon vertices.
383 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
384 &quot;x&quot;: 42, # X coordinate.
385 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
386 },
387 ],
388 },
389 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
390 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
391 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
392 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
393 &quot;textSegments&quot;: [ # The text segments from the Document.text.
394 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
395 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
396 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
397 },
398 ],
399 },
400 },
401 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
402 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
403 &quot;parents&quot;: [ # References to the original elements that are replaced.
404 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
405 &quot;id&quot;: 42, # The id of the parent provenance.
406 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
407 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
408 },
409 ],
410 &quot;revision&quot;: 42, # The index of the revision that produced this element.
411 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
412 },
413 },
414 ],
415 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
416 { # A detected barcode.
417 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
418 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
419 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
420 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
421 },
422 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
423 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
424 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
425 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
426 &quot;x&quot;: 3.14, # X coordinate.
427 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
428 },
429 ],
430 &quot;vertices&quot;: [ # The bounding polygon vertices.
431 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
432 &quot;x&quot;: 42, # X coordinate.
433 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
434 },
435 ],
436 },
437 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
438 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
439 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
440 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
441 &quot;textSegments&quot;: [ # The text segments from the Document.text.
442 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
443 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
444 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
445 },
446 ],
447 },
448 },
449 },
450 ],
451 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
452 { # Detected language for a structural component.
453 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
454 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
455 },
456 ],
457 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
458 &quot;height&quot;: 3.14, # Page height.
459 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
460 &quot;width&quot;: 3.14, # Page width.
461 },
462 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
463 { # A form field detected on the page.
464 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
465 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
466 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
467 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
468 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
469 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
470 &quot;x&quot;: 3.14, # X coordinate.
471 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
472 },
473 ],
474 &quot;vertices&quot;: [ # The bounding polygon vertices.
475 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
476 &quot;x&quot;: 42, # X coordinate.
477 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
478 },
479 ],
480 },
481 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
482 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
483 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
484 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
485 &quot;textSegments&quot;: [ # The text segments from the Document.text.
486 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
487 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
488 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
489 },
490 ],
491 },
492 },
493 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
494 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
495 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
496 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
497 &quot;x&quot;: 3.14, # X coordinate.
498 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
499 },
500 ],
501 &quot;vertices&quot;: [ # The bounding polygon vertices.
502 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
503 &quot;x&quot;: 42, # X coordinate.
504 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
505 },
506 ],
507 },
508 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
509 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
510 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
511 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
512 &quot;textSegments&quot;: [ # The text segments from the Document.text.
513 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
514 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
515 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
516 },
517 ],
518 },
519 },
520 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
521 { # Detected language for a structural component.
522 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
523 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
524 },
525 ],
526 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
527 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
528 &quot;parents&quot;: [ # References to the original elements that are replaced.
529 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
530 &quot;id&quot;: 42, # The id of the parent provenance.
531 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
532 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
533 },
534 ],
535 &quot;revision&quot;: 42, # The index of the revision that produced this element.
536 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
537 },
538 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
539 { # Detected language for a structural component.
540 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
541 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
542 },
543 ],
544 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
545 },
546 ],
547 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
548 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
549 &quot;height&quot;: 42, # Height of the image in pixels.
550 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
551 &quot;width&quot;: 42, # Width of the image in pixels.
552 },
553 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
554 &quot;detectedDefects&quot;: [ # A list of detected defects.
555 { # Image Quality Defects
556 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
557 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
558 },
559 ],
560 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
561 },
562 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
563 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
564 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
565 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
566 &quot;x&quot;: 3.14, # X coordinate.
567 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
568 },
569 ],
570 &quot;vertices&quot;: [ # The bounding polygon vertices.
571 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
572 &quot;x&quot;: 42, # X coordinate.
573 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
574 },
575 ],
576 },
577 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
578 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
579 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
580 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
581 &quot;textSegments&quot;: [ # The text segments from the Document.text.
582 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
583 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
584 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
585 },
586 ],
587 },
588 },
589 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
590 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
591 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
592 { # Detected language for a structural component.
593 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
594 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
595 },
596 ],
597 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
598 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
599 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
600 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
601 &quot;x&quot;: 3.14, # X coordinate.
602 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
603 },
604 ],
605 &quot;vertices&quot;: [ # The bounding polygon vertices.
606 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
607 &quot;x&quot;: 42, # X coordinate.
608 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
609 },
610 ],
611 },
612 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
613 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
614 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
615 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
616 &quot;textSegments&quot;: [ # The text segments from the Document.text.
617 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
618 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
619 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
620 },
621 ],
622 },
623 },
624 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
625 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
626 &quot;parents&quot;: [ # References to the original elements that are replaced.
627 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
628 &quot;id&quot;: 42, # The id of the parent provenance.
629 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
630 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
631 },
632 ],
633 &quot;revision&quot;: 42, # The index of the revision that produced this element.
634 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
635 },
636 },
637 ],
638 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
639 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
640 { # A collection of lines that a human would perceive as a paragraph.
641 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
642 { # Detected language for a structural component.
643 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
644 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
645 },
646 ],
647 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
648 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
649 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
650 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
651 &quot;x&quot;: 3.14, # X coordinate.
652 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
653 },
654 ],
655 &quot;vertices&quot;: [ # The bounding polygon vertices.
656 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
657 &quot;x&quot;: 42, # X coordinate.
658 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
659 },
660 ],
661 },
662 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
663 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
664 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
665 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
666 &quot;textSegments&quot;: [ # The text segments from the Document.text.
667 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
668 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
669 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
670 },
671 ],
672 },
673 },
674 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
675 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
676 &quot;parents&quot;: [ # References to the original elements that are replaced.
677 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
678 &quot;id&quot;: 42, # The id of the parent provenance.
679 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
680 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
681 },
682 ],
683 &quot;revision&quot;: 42, # The index of the revision that produced this element.
684 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
685 },
686 },
687 ],
688 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
689 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
690 &quot;parents&quot;: [ # References to the original elements that are replaced.
691 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
692 &quot;id&quot;: 42, # The id of the parent provenance.
693 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
694 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
695 },
696 ],
697 &quot;revision&quot;: 42, # The index of the revision that produced this element.
698 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
699 },
700 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
701 { # A detected symbol.
702 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
703 { # Detected language for a structural component.
704 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
705 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
706 },
707 ],
708 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
709 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
710 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
711 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
712 &quot;x&quot;: 3.14, # X coordinate.
713 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
714 },
715 ],
716 &quot;vertices&quot;: [ # The bounding polygon vertices.
717 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
718 &quot;x&quot;: 42, # X coordinate.
719 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
720 },
721 ],
722 },
723 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
724 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
725 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
726 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
727 &quot;textSegments&quot;: [ # The text segments from the Document.text.
728 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
729 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
730 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
731 },
732 ],
733 },
734 },
735 },
736 ],
737 &quot;tables&quot;: [ # A list of visually detected tables on the page.
738 { # A table representation similar to HTML table structure.
739 &quot;bodyRows&quot;: [ # Body rows of the table.
740 { # A row of table cells.
741 &quot;cells&quot;: [ # Cells that make up this row.
742 { # A cell representation inside the table.
743 &quot;colSpan&quot;: 42, # How many columns this cell spans.
744 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
745 { # Detected language for a structural component.
746 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
747 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
748 },
749 ],
750 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
751 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
752 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
753 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
754 &quot;x&quot;: 3.14, # X coordinate.
755 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
756 },
757 ],
758 &quot;vertices&quot;: [ # The bounding polygon vertices.
759 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
760 &quot;x&quot;: 42, # X coordinate.
761 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
762 },
763 ],
764 },
765 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
766 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
767 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
768 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
769 &quot;textSegments&quot;: [ # The text segments from the Document.text.
770 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
771 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
772 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
773 },
774 ],
775 },
776 },
777 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
778 },
779 ],
780 },
781 ],
782 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
783 { # Detected language for a structural component.
784 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
785 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
786 },
787 ],
788 &quot;headerRows&quot;: [ # Header rows of the table.
789 { # A row of table cells.
790 &quot;cells&quot;: [ # Cells that make up this row.
791 { # A cell representation inside the table.
792 &quot;colSpan&quot;: 42, # How many columns this cell spans.
793 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
794 { # Detected language for a structural component.
795 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
796 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
797 },
798 ],
799 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
800 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
801 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
802 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
803 &quot;x&quot;: 3.14, # X coordinate.
804 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
805 },
806 ],
807 &quot;vertices&quot;: [ # The bounding polygon vertices.
808 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
809 &quot;x&quot;: 42, # X coordinate.
810 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
811 },
812 ],
813 },
814 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
815 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
816 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
817 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
818 &quot;textSegments&quot;: [ # The text segments from the Document.text.
819 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
820 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
821 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
822 },
823 ],
824 },
825 },
826 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
827 },
828 ],
829 },
830 ],
831 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
832 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
833 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
834 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
835 &quot;x&quot;: 3.14, # X coordinate.
836 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
837 },
838 ],
839 &quot;vertices&quot;: [ # The bounding polygon vertices.
840 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
841 &quot;x&quot;: 42, # X coordinate.
842 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
843 },
844 ],
845 },
846 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
847 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
848 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
849 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
850 &quot;textSegments&quot;: [ # The text segments from the Document.text.
851 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
852 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
853 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
854 },
855 ],
856 },
857 },
858 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
859 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
860 &quot;parents&quot;: [ # References to the original elements that are replaced.
861 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
862 &quot;id&quot;: 42, # The id of the parent provenance.
863 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
864 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
865 },
866 ],
867 &quot;revision&quot;: 42, # The index of the revision that produced this element.
868 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
869 },
870 },
871 ],
872 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
873 { # A detected token.
874 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
875 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
876 },
877 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
878 { # Detected language for a structural component.
879 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
880 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
881 },
882 ],
883 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
884 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
885 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
886 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
887 &quot;x&quot;: 3.14, # X coordinate.
888 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
889 },
890 ],
891 &quot;vertices&quot;: [ # The bounding polygon vertices.
892 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
893 &quot;x&quot;: 42, # X coordinate.
894 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
895 },
896 ],
897 },
898 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
899 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
900 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
901 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
902 &quot;textSegments&quot;: [ # The text segments from the Document.text.
903 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
904 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
905 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
906 },
907 ],
908 },
909 },
910 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
911 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
912 &quot;parents&quot;: [ # References to the original elements that are replaced.
913 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
914 &quot;id&quot;: 42, # The id of the parent provenance.
915 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
916 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
917 },
918 ],
919 &quot;revision&quot;: 42, # The index of the revision that produced this element.
920 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
921 },
922 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
923 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
924 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
925 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
926 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
927 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
928 },
929 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
930 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
931 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
932 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
933 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
934 &quot;italic&quot;: True or False, # Whether the text is italic.
935 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
936 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
937 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
938 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
939 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
940 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
941 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
942 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
943 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
944 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
945 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
946 },
947 &quot;underlined&quot;: True or False, # Whether the text is underlined.
948 },
949 },
950 ],
951 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
952 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
953 &quot;cols&quot;: 42, # Number of columns in the matrix.
954 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
955 &quot;rows&quot;: 42, # Number of rows in the matrix.
956 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
957 },
958 ],
959 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
960 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
961 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
962 { # Detected language for a structural component.
963 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
964 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
965 },
966 ],
967 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
968 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
969 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
970 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
971 &quot;x&quot;: 3.14, # X coordinate.
972 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
973 },
974 ],
975 &quot;vertices&quot;: [ # The bounding polygon vertices.
976 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
977 &quot;x&quot;: 42, # X coordinate.
978 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
979 },
980 ],
981 },
982 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
983 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
984 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
985 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
986 &quot;textSegments&quot;: [ # The text segments from the Document.text.
987 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
988 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
989 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
990 },
991 ],
992 },
993 },
994 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
995 },
996 ],
997 },
998 ],
999 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
1000 { # Contains past or forward revisions of this document.
1001 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
1002 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
1003 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
1004 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
1005 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
1006 },
1007 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
1008 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
1009 42,
1010 ],
1011 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
1012 &quot;A String&quot;,
1013 ],
1014 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
1015 },
1016 ],
1017 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
1018 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
1019 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
1020 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
1021 },
1022 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
1023 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
1024 { # This message is used for text changes aka. OCR corrections.
1025 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
1026 &quot;provenance&quot;: [ # The history of this annotation.
1027 { # Structure to identify provenance relationships between annotations in different revisions.
1028 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1029 &quot;parents&quot;: [ # References to the original elements that are replaced.
1030 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1031 &quot;id&quot;: 42, # The id of the parent provenance.
1032 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1033 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1034 },
1035 ],
1036 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1037 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1038 },
1039 ],
1040 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
1041 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1042 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1043 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1044 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1045 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1046 },
1047 ],
1048 },
1049 },
1050 ],
1051 &quot;textStyles&quot;: [ # Styles for the Document.text.
1052 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
1053 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
1054 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
1055 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1056 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1057 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1058 },
1059 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
1060 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
1061 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1062 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1063 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1064 },
1065 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
1066 &quot;fontSize&quot;: { # Font size with unit. # Font size.
1067 &quot;size&quot;: 3.14, # Font size for the text.
1068 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
1069 },
1070 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
1071 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1072 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1073 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1074 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1075 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1076 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1077 },
1078 ],
1079 },
1080 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
1081 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
1082 },
1083 ],
1084 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
1085 },
1086 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
1087 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
1088 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
1089 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
1090 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
1091 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
1092 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
1093 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
1094 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
1095 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
1096 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
1097 &quot;properties&quot;: [ # List of values that are user supplied metadata.
1098 { # Property of a document.
1099 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
1100 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
1101 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
1102 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
1103 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
1104 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
1105 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
1106 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
1107 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
1108 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
1109 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
1110 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
1111 },
1112 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
1113 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
1114 },
1115 ],
1116 },
1117 &quot;enumValues&quot;: { # Enum values. # Enum property values.
1118 &quot;values&quot;: [ # List of enum values.
1119 &quot;A String&quot;,
1120 ],
1121 },
1122 &quot;floatValues&quot;: { # Float values. # Float property values.
1123 &quot;values&quot;: [ # List of float values.
1124 3.14,
1125 ],
1126 },
1127 &quot;integerValues&quot;: { # Integer values. # Integer property values.
1128 &quot;values&quot;: [ # List of integer values.
1129 42,
1130 ],
1131 },
1132 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
1133 &quot;fields&quot;: { # Unordered map of dynamically typed values.
1134 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
1135 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
1136 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
1137 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
1138 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
1139 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
1140 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
1141 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
1142 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
1143 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
1144 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
1145 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
1146 },
1147 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
1148 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
1149 },
1150 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
1151 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
1152 },
1153 &quot;floatValue&quot;: 3.14, # Represents a float value.
1154 &quot;intValue&quot;: 42, # Represents a integer value.
1155 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
1156 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
1157 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
1158 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
1159 },
1160 },
1161 },
1162 },
1163 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
1164 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
1165 &quot;properties&quot;: [ # List of property values.
1166 # Object with schema name: GoogleCloudContentwarehouseV1Property
1167 ],
1168 },
1169 &quot;textValues&quot;: { # String/text values. # String/text property values.
1170 &quot;values&quot;: [ # List of text values.
1171 &quot;A String&quot;,
1172 ],
1173 },
1174 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
1175 &quot;values&quot;: [ # List of timestamp values.
1176 { # Timestamp value type.
1177 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
1178 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
1179 },
1180 ],
1181 },
1182 },
1183 ],
1184 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
1185 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
1186 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
1187 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
1188 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
1189 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
1190 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
1191 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
1192 },
1193 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Default document policy during creation. This refers to an Identity and Access (IAM) policy, which specifies access controls for the Document. Conditions defined in the policy will be ignored.
1194 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1195 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
1196 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1197 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
1198 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
1199 &quot;A String&quot;,
1200 ],
1201 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1202 },
1203 ],
1204 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
1205 },
1206 ],
1207 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
1208 { # Associates `members`, or principals, with a `role`.
1209 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1210 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1211 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1212 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1213 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1214 },
1215 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
1216 &quot;A String&quot;,
1217 ],
1218 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
1219 },
1220 ],
1221 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1222 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1223 },
1224 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control for the service.
1225 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
1226 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
1227 &quot;A String&quot;,
1228 ],
1229 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
1230 },
1231 },
1232 }
1233
1234 x__xgafv: string, V1 error format.
1235 Allowed values
1236 1 - v1 error format
1237 2 - v2 error format
1238
1239 Returns:
1240 An object of the form:
1241
1242 { # Response message for DocumentService.CreateDocument.
1243 &quot;document&quot;: { # Defines the structure for content warehouse document proto. # Document created after executing create request.
1244 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
1245 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
1246 &quot;chunks&quot;: [ # List of chunks.
1247 { # Represents a chunk.
1248 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
1249 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
1250 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
1251 { # Represents the page footer associated with the chunk.
1252 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
1253 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
1254 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
1255 },
1256 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
1257 },
1258 ],
1259 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
1260 { # Represents the page header associated with the chunk.
1261 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
1262 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
1263 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
1264 },
1265 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
1266 },
1267 ],
1268 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
1269 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
1270 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
1271 },
1272 &quot;sourceBlockIds&quot;: [ # Unused.
1273 &quot;A String&quot;,
1274 ],
1275 },
1276 ],
1277 },
1278 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
1279 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
1280 &quot;blocks&quot;: [ # List of blocks in the document.
1281 { # Represents a block. A block could be one of the various types (text, table, list) supported.
1282 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
1283 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
1284 &quot;listEntries&quot;: [ # List entries that constitute a list block.
1285 { # Represents an entry in the list.
1286 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
1287 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
1288 ],
1289 },
1290 ],
1291 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
1292 },
1293 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
1294 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
1295 &quot;pageStart&quot;: 42, # Page where block starts in the document.
1296 },
1297 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
1298 &quot;bodyRows&quot;: [ # Body rows containing main table content.
1299 { # Represents a row in a table.
1300 &quot;cells&quot;: [ # A table row is a list of table cells.
1301 { # Represents a cell in a table row.
1302 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
1303 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
1304 ],
1305 &quot;colSpan&quot;: 42, # How many columns this cell spans.
1306 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
1307 },
1308 ],
1309 },
1310 ],
1311 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
1312 &quot;headerRows&quot;: [ # Header rows at the top of the table.
1313 { # Represents a row in a table.
1314 &quot;cells&quot;: [ # A table row is a list of table cells.
1315 { # Represents a cell in a table row.
1316 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
1317 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
1318 ],
1319 &quot;colSpan&quot;: 42, # How many columns this cell spans.
1320 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
1321 },
1322 ],
1323 },
1324 ],
1325 },
1326 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
1327 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
1328 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
1329 ],
1330 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
1331 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
1332 },
1333 },
1334 ],
1335 },
1336 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
1337 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
1338 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
1339 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
1340 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
1341 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
1342 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
1343 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
1344 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
1345 &quot;A String&quot;,
1346 ],
1347 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
1348 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
1349 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
1350 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
1351 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
1352 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
1353 &quot;A String&quot;,
1354 ],
1355 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
1356 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
1357 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
1358 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
1359 },
1360 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
1361 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
1362 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
1363 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
1364 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
1365 },
1366 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
1367 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
1368 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
1369 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
1370 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
1371 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
1372 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
1373 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
1374 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
1375 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
1376 },
1377 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
1378 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
1379 },
1380 &quot;floatValue&quot;: 3.14, # Float value.
1381 &quot;integerValue&quot;: 42, # Integer value.
1382 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
1383 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
1384 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
1385 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
1386 },
1387 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
1388 },
1389 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
1390 &quot;pageRefs&quot;: [ # One or more references to visual page elements
1391 { # Represents a weak reference to a page element within a document.
1392 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
1393 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1394 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1395 &quot;x&quot;: 3.14, # X coordinate.
1396 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1397 },
1398 ],
1399 &quot;vertices&quot;: [ # The bounding polygon vertices.
1400 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1401 &quot;x&quot;: 42, # X coordinate.
1402 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1403 },
1404 ],
1405 },
1406 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
1407 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
1408 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
1409 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
1410 },
1411 ],
1412 },
1413 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
1414 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
1415 ],
1416 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
1417 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1418 &quot;parents&quot;: [ # References to the original elements that are replaced.
1419 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1420 &quot;id&quot;: 42, # The id of the parent provenance.
1421 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1422 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1423 },
1424 ],
1425 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1426 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1427 },
1428 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
1429 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
1430 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1431 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1432 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1433 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1434 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1435 },
1436 ],
1437 },
1438 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
1439 },
1440 ],
1441 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
1442 { # Relationship between Entities.
1443 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
1444 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
1445 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
1446 },
1447 ],
1448 &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). # Any error that occurred while processing this document.
1449 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1450 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1451 {
1452 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1453 },
1454 ],
1455 &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.
1456 },
1457 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
1458 &quot;pages&quot;: [ # Visual page layout for the Document.
1459 { # A page in a Document.
1460 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
1461 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
1462 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1463 { # Detected language for a structural component.
1464 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1465 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1466 },
1467 ],
1468 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
1469 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1470 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1471 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1472 &quot;x&quot;: 3.14, # X coordinate.
1473 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1474 },
1475 ],
1476 &quot;vertices&quot;: [ # The bounding polygon vertices.
1477 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1478 &quot;x&quot;: 42, # X coordinate.
1479 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1480 },
1481 ],
1482 },
1483 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1484 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1485 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1486 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1487 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1488 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1489 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1490 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1491 },
1492 ],
1493 },
1494 },
1495 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
1496 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1497 &quot;parents&quot;: [ # References to the original elements that are replaced.
1498 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1499 &quot;id&quot;: 42, # The id of the parent provenance.
1500 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1501 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1502 },
1503 ],
1504 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1505 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1506 },
1507 },
1508 ],
1509 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
1510 { # A detected barcode.
1511 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
1512 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
1513 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
1514 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
1515 },
1516 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
1517 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1518 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1519 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1520 &quot;x&quot;: 3.14, # X coordinate.
1521 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1522 },
1523 ],
1524 &quot;vertices&quot;: [ # The bounding polygon vertices.
1525 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1526 &quot;x&quot;: 42, # X coordinate.
1527 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1528 },
1529 ],
1530 },
1531 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1532 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1533 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1534 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1535 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1536 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1537 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1538 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1539 },
1540 ],
1541 },
1542 },
1543 },
1544 ],
1545 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1546 { # Detected language for a structural component.
1547 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1548 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1549 },
1550 ],
1551 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
1552 &quot;height&quot;: 3.14, # Page height.
1553 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
1554 &quot;width&quot;: 3.14, # Page width.
1555 },
1556 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
1557 { # A form field detected on the page.
1558 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
1559 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
1560 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
1561 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1562 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1563 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1564 &quot;x&quot;: 3.14, # X coordinate.
1565 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1566 },
1567 ],
1568 &quot;vertices&quot;: [ # The bounding polygon vertices.
1569 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1570 &quot;x&quot;: 42, # X coordinate.
1571 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1572 },
1573 ],
1574 },
1575 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1576 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1577 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1578 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1579 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1580 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1581 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1582 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1583 },
1584 ],
1585 },
1586 },
1587 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
1588 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1589 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1590 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1591 &quot;x&quot;: 3.14, # X coordinate.
1592 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1593 },
1594 ],
1595 &quot;vertices&quot;: [ # The bounding polygon vertices.
1596 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1597 &quot;x&quot;: 42, # X coordinate.
1598 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1599 },
1600 ],
1601 },
1602 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1603 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1604 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1605 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1606 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1607 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1608 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1609 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1610 },
1611 ],
1612 },
1613 },
1614 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
1615 { # Detected language for a structural component.
1616 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1617 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1618 },
1619 ],
1620 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
1621 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1622 &quot;parents&quot;: [ # References to the original elements that are replaced.
1623 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1624 &quot;id&quot;: 42, # The id of the parent provenance.
1625 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1626 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1627 },
1628 ],
1629 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1630 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1631 },
1632 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
1633 { # Detected language for a structural component.
1634 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1635 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1636 },
1637 ],
1638 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
1639 },
1640 ],
1641 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
1642 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
1643 &quot;height&quot;: 42, # Height of the image in pixels.
1644 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
1645 &quot;width&quot;: 42, # Width of the image in pixels.
1646 },
1647 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
1648 &quot;detectedDefects&quot;: [ # A list of detected defects.
1649 { # Image Quality Defects
1650 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
1651 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
1652 },
1653 ],
1654 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
1655 },
1656 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
1657 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1658 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1659 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1660 &quot;x&quot;: 3.14, # X coordinate.
1661 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1662 },
1663 ],
1664 &quot;vertices&quot;: [ # The bounding polygon vertices.
1665 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1666 &quot;x&quot;: 42, # X coordinate.
1667 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1668 },
1669 ],
1670 },
1671 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1672 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1673 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1674 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1675 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1676 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1677 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1678 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1679 },
1680 ],
1681 },
1682 },
1683 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
1684 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
1685 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1686 { # Detected language for a structural component.
1687 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1688 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1689 },
1690 ],
1691 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
1692 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1693 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1694 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1695 &quot;x&quot;: 3.14, # X coordinate.
1696 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1697 },
1698 ],
1699 &quot;vertices&quot;: [ # The bounding polygon vertices.
1700 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1701 &quot;x&quot;: 42, # X coordinate.
1702 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1703 },
1704 ],
1705 },
1706 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1707 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1708 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1709 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1710 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1711 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1712 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1713 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1714 },
1715 ],
1716 },
1717 },
1718 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
1719 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1720 &quot;parents&quot;: [ # References to the original elements that are replaced.
1721 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1722 &quot;id&quot;: 42, # The id of the parent provenance.
1723 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1724 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1725 },
1726 ],
1727 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1728 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1729 },
1730 },
1731 ],
1732 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
1733 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
1734 { # A collection of lines that a human would perceive as a paragraph.
1735 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1736 { # Detected language for a structural component.
1737 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1738 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1739 },
1740 ],
1741 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
1742 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1743 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1744 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1745 &quot;x&quot;: 3.14, # X coordinate.
1746 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1747 },
1748 ],
1749 &quot;vertices&quot;: [ # The bounding polygon vertices.
1750 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1751 &quot;x&quot;: 42, # X coordinate.
1752 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1753 },
1754 ],
1755 },
1756 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1757 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1758 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1759 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1760 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1761 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1762 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1763 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1764 },
1765 ],
1766 },
1767 },
1768 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
1769 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1770 &quot;parents&quot;: [ # References to the original elements that are replaced.
1771 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1772 &quot;id&quot;: 42, # The id of the parent provenance.
1773 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1774 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1775 },
1776 ],
1777 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1778 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1779 },
1780 },
1781 ],
1782 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
1783 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1784 &quot;parents&quot;: [ # References to the original elements that are replaced.
1785 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1786 &quot;id&quot;: 42, # The id of the parent provenance.
1787 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1788 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1789 },
1790 ],
1791 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1792 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1793 },
1794 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
1795 { # A detected symbol.
1796 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1797 { # Detected language for a structural component.
1798 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1799 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1800 },
1801 ],
1802 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
1803 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1804 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1805 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1806 &quot;x&quot;: 3.14, # X coordinate.
1807 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1808 },
1809 ],
1810 &quot;vertices&quot;: [ # The bounding polygon vertices.
1811 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1812 &quot;x&quot;: 42, # X coordinate.
1813 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1814 },
1815 ],
1816 },
1817 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1818 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1819 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1820 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1821 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1822 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1823 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1824 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1825 },
1826 ],
1827 },
1828 },
1829 },
1830 ],
1831 &quot;tables&quot;: [ # A list of visually detected tables on the page.
1832 { # A table representation similar to HTML table structure.
1833 &quot;bodyRows&quot;: [ # Body rows of the table.
1834 { # A row of table cells.
1835 &quot;cells&quot;: [ # Cells that make up this row.
1836 { # A cell representation inside the table.
1837 &quot;colSpan&quot;: 42, # How many columns this cell spans.
1838 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1839 { # Detected language for a structural component.
1840 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1841 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1842 },
1843 ],
1844 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
1845 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1846 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1847 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1848 &quot;x&quot;: 3.14, # X coordinate.
1849 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1850 },
1851 ],
1852 &quot;vertices&quot;: [ # The bounding polygon vertices.
1853 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1854 &quot;x&quot;: 42, # X coordinate.
1855 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1856 },
1857 ],
1858 },
1859 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1860 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1861 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1862 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1863 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1864 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1865 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1866 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1867 },
1868 ],
1869 },
1870 },
1871 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
1872 },
1873 ],
1874 },
1875 ],
1876 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1877 { # Detected language for a structural component.
1878 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1879 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1880 },
1881 ],
1882 &quot;headerRows&quot;: [ # Header rows of the table.
1883 { # A row of table cells.
1884 &quot;cells&quot;: [ # Cells that make up this row.
1885 { # A cell representation inside the table.
1886 &quot;colSpan&quot;: 42, # How many columns this cell spans.
1887 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1888 { # Detected language for a structural component.
1889 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1890 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1891 },
1892 ],
1893 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
1894 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1895 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1896 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1897 &quot;x&quot;: 3.14, # X coordinate.
1898 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1899 },
1900 ],
1901 &quot;vertices&quot;: [ # The bounding polygon vertices.
1902 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1903 &quot;x&quot;: 42, # X coordinate.
1904 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1905 },
1906 ],
1907 },
1908 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1909 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1910 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1911 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1912 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1913 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1914 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1915 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1916 },
1917 ],
1918 },
1919 },
1920 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
1921 },
1922 ],
1923 },
1924 ],
1925 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
1926 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1927 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1928 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1929 &quot;x&quot;: 3.14, # X coordinate.
1930 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1931 },
1932 ],
1933 &quot;vertices&quot;: [ # The bounding polygon vertices.
1934 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1935 &quot;x&quot;: 42, # X coordinate.
1936 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1937 },
1938 ],
1939 },
1940 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1941 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1942 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1943 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1944 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1945 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1946 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1947 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
1948 },
1949 ],
1950 },
1951 },
1952 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
1953 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
1954 &quot;parents&quot;: [ # References to the original elements that are replaced.
1955 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
1956 &quot;id&quot;: 42, # The id of the parent provenance.
1957 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
1958 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
1959 },
1960 ],
1961 &quot;revision&quot;: 42, # The index of the revision that produced this element.
1962 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
1963 },
1964 },
1965 ],
1966 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
1967 { # A detected token.
1968 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
1969 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
1970 },
1971 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1972 { # Detected language for a structural component.
1973 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
1974 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
1975 },
1976 ],
1977 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
1978 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
1979 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1980 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
1981 &quot;x&quot;: 3.14, # X coordinate.
1982 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
1983 },
1984 ],
1985 &quot;vertices&quot;: [ # The bounding polygon vertices.
1986 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
1987 &quot;x&quot;: 42, # X coordinate.
1988 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
1989 },
1990 ],
1991 },
1992 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
1993 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
1994 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
1995 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
1996 &quot;textSegments&quot;: [ # The text segments from the Document.text.
1997 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
1998 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
1999 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
2000 },
2001 ],
2002 },
2003 },
2004 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
2005 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
2006 &quot;parents&quot;: [ # References to the original elements that are replaced.
2007 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
2008 &quot;id&quot;: 42, # The id of the parent provenance.
2009 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
2010 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
2011 },
2012 ],
2013 &quot;revision&quot;: 42, # The index of the revision that produced this element.
2014 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
2015 },
2016 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
2017 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
2018 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
2019 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2020 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
2021 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
2022 },
2023 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
2024 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
2025 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
2026 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
2027 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
2028 &quot;italic&quot;: True or False, # Whether the text is italic.
2029 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
2030 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
2031 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
2032 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
2033 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
2034 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
2035 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
2036 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
2037 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2038 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
2039 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
2040 },
2041 &quot;underlined&quot;: True or False, # Whether the text is underlined.
2042 },
2043 },
2044 ],
2045 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
2046 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
2047 &quot;cols&quot;: 42, # Number of columns in the matrix.
2048 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
2049 &quot;rows&quot;: 42, # Number of rows in the matrix.
2050 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
2051 },
2052 ],
2053 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
2054 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
2055 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
2056 { # Detected language for a structural component.
2057 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
2058 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
2059 },
2060 ],
2061 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
2062 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
2063 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
2064 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
2065 &quot;x&quot;: 3.14, # X coordinate.
2066 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
2067 },
2068 ],
2069 &quot;vertices&quot;: [ # The bounding polygon vertices.
2070 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
2071 &quot;x&quot;: 42, # X coordinate.
2072 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
2073 },
2074 ],
2075 },
2076 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
2077 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
2078 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
2079 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
2080 &quot;textSegments&quot;: [ # The text segments from the Document.text.
2081 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
2082 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
2083 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
2084 },
2085 ],
2086 },
2087 },
2088 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
2089 },
2090 ],
2091 },
2092 ],
2093 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
2094 { # Contains past or forward revisions of this document.
2095 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
2096 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
2097 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
2098 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
2099 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
2100 },
2101 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
2102 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
2103 42,
2104 ],
2105 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
2106 &quot;A String&quot;,
2107 ],
2108 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
2109 },
2110 ],
2111 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
2112 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
2113 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
2114 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
2115 },
2116 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
2117 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
2118 { # This message is used for text changes aka. OCR corrections.
2119 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
2120 &quot;provenance&quot;: [ # The history of this annotation.
2121 { # Structure to identify provenance relationships between annotations in different revisions.
2122 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
2123 &quot;parents&quot;: [ # References to the original elements that are replaced.
2124 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
2125 &quot;id&quot;: 42, # The id of the parent provenance.
2126 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
2127 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
2128 },
2129 ],
2130 &quot;revision&quot;: 42, # The index of the revision that produced this element.
2131 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
2132 },
2133 ],
2134 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
2135 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
2136 &quot;textSegments&quot;: [ # The text segments from the Document.text.
2137 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
2138 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
2139 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
2140 },
2141 ],
2142 },
2143 },
2144 ],
2145 &quot;textStyles&quot;: [ # Styles for the Document.text.
2146 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
2147 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
2148 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
2149 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2150 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
2151 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
2152 },
2153 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
2154 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
2155 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
2156 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
2157 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
2158 },
2159 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
2160 &quot;fontSize&quot;: { # Font size with unit. # Font size.
2161 &quot;size&quot;: 3.14, # Font size for the text.
2162 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
2163 },
2164 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
2165 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
2166 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
2167 &quot;textSegments&quot;: [ # The text segments from the Document.text.
2168 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
2169 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
2170 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
2171 },
2172 ],
2173 },
2174 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
2175 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
2176 },
2177 ],
2178 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
2179 },
2180 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
2181 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
2182 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
2183 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
2184 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
2185 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
2186 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
2187 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
2188 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
2189 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
2190 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
2191 &quot;properties&quot;: [ # List of values that are user supplied metadata.
2192 { # Property of a document.
2193 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
2194 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
2195 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
2196 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
2197 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
2198 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
2199 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
2200 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
2201 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
2202 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
2203 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
2204 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
2205 },
2206 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
2207 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
2208 },
2209 ],
2210 },
2211 &quot;enumValues&quot;: { # Enum values. # Enum property values.
2212 &quot;values&quot;: [ # List of enum values.
2213 &quot;A String&quot;,
2214 ],
2215 },
2216 &quot;floatValues&quot;: { # Float values. # Float property values.
2217 &quot;values&quot;: [ # List of float values.
2218 3.14,
2219 ],
2220 },
2221 &quot;integerValues&quot;: { # Integer values. # Integer property values.
2222 &quot;values&quot;: [ # List of integer values.
2223 42,
2224 ],
2225 },
2226 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
2227 &quot;fields&quot;: { # Unordered map of dynamically typed values.
2228 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
2229 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
2230 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
2231 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
2232 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
2233 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
2234 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
2235 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
2236 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
2237 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
2238 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
2239 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
2240 },
2241 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
2242 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
2243 },
2244 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
2245 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
2246 },
2247 &quot;floatValue&quot;: 3.14, # Represents a float value.
2248 &quot;intValue&quot;: 42, # Represents a integer value.
2249 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
2250 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
2251 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
2252 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
2253 },
2254 },
2255 },
2256 },
2257 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
2258 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
2259 &quot;properties&quot;: [ # List of property values.
2260 # Object with schema name: GoogleCloudContentwarehouseV1Property
2261 ],
2262 },
2263 &quot;textValues&quot;: { # String/text values. # String/text property values.
2264 &quot;values&quot;: [ # List of text values.
2265 &quot;A String&quot;,
2266 ],
2267 },
2268 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
2269 &quot;values&quot;: [ # List of timestamp values.
2270 { # Timestamp value type.
2271 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
2272 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
2273 },
2274 ],
2275 },
2276 },
2277 ],
2278 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
2279 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
2280 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
2281 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
2282 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
2283 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
2284 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
2285 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
2286 },
2287 &quot;longRunningOperations&quot;: [ # post-processing LROs
2288 { # This resource represents a long-running operation that is the result of a network API call.
2289 &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.
2290 &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.
2291 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2292 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2293 {
2294 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2295 },
2296 ],
2297 &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.
2298 },
2299 &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.
2300 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2301 },
2302 &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}`.
2303 &quot;response&quot;: { # The normal, successful response of the operation. 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`.
2304 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2305 },
2306 },
2307 ],
2308 &quot;metadata&quot;: { # Additional information returned to client, such as debugging information. # Additional information for the API invocation, such as the request tracking id.
2309 &quot;requestId&quot;: &quot;A String&quot;, # A unique id associated with this call. This id is logged for tracking purpose.
2310 },
2311 &quot;ruleEngineOutput&quot;: { # Records the output of Rule Engine including rule evaluation and actions result. # Output from Rule Engine recording the rule evaluator and action executor&#x27;s output. Refer format in: google/cloud/contentwarehouse/v1/rule_engine.proto
2312 &quot;actionExecutorOutput&quot;: { # Represents the output of the Action Executor. # Output from Action Executor containing rule and corresponding actions execution result.
2313 &quot;ruleActionsPairs&quot;: [ # List of rule and corresponding actions result.
2314 { # Represents a rule and outputs of associated actions.
2315 &quot;actionOutputs&quot;: [ # Outputs of executing the actions associated with the above rule.
2316 { # Represents the result of executing an action.
2317 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action.
2318 &quot;actionState&quot;: &quot;A String&quot;, # State of an action.
2319 &quot;outputMessage&quot;: &quot;A String&quot;, # Action execution output message.
2320 },
2321 ],
2322 &quot;rule&quot;: { # Represents the rule for a content warehouse trigger. # Represents the rule.
2323 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
2324 { # Represents the action triggered by Rule Engine when the rule is true.
2325 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
2326 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
2327 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
2328 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2329 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
2330 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2331 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
2332 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
2333 &quot;A String&quot;,
2334 ],
2335 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2336 },
2337 ],
2338 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2339 },
2340 ],
2341 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
2342 { # Associates `members`, or principals, with a `role`.
2343 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2344 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2345 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2346 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2347 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2348 },
2349 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2350 &quot;A String&quot;,
2351 ],
2352 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
2353 },
2354 ],
2355 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2356 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2357 },
2358 },
2359 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
2360 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
2361 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2362 &quot;A String&quot;,
2363 ],
2364 },
2365 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
2366 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
2367 &quot;a_key&quot;: &quot;A String&quot;,
2368 },
2369 },
2370 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
2371 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
2372 &quot;a_key&quot;: &quot;A String&quot;,
2373 },
2374 },
2375 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
2376 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
2377 },
2378 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
2379 &quot;messages&quot;: [ # Messages to be published.
2380 &quot;A String&quot;,
2381 ],
2382 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
2383 },
2384 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
2385 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
2386 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2387 },
2388 },
2389 ],
2390 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
2391 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
2392 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
2393 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
2394 },
2395 },
2396 ],
2397 },
2398 &quot;documentName&quot;: &quot;A String&quot;, # Name of the document against which the rules and actions were evaluated.
2399 &quot;ruleEvaluatorOutput&quot;: { # Represents the output of the Rule Evaluator. # Output from Rule Evaluator containing matched, unmatched and invalid rules.
2400 &quot;invalidRules&quot;: [ # A subset of triggered rules that failed the validation check(s) after parsing.
2401 { # A triggered rule that failed the validation check(s) after parsing.
2402 &quot;error&quot;: &quot;A String&quot;, # Validation error on a parsed expression.
2403 &quot;rule&quot;: { # Represents the rule for a content warehouse trigger. # Triggered rule.
2404 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
2405 { # Represents the action triggered by Rule Engine when the rule is true.
2406 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
2407 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
2408 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
2409 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2410 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
2411 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2412 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
2413 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
2414 &quot;A String&quot;,
2415 ],
2416 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2417 },
2418 ],
2419 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2420 },
2421 ],
2422 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
2423 { # Associates `members`, or principals, with a `role`.
2424 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2425 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2426 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2427 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2428 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2429 },
2430 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2431 &quot;A String&quot;,
2432 ],
2433 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
2434 },
2435 ],
2436 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2437 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2438 },
2439 },
2440 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
2441 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
2442 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2443 &quot;A String&quot;,
2444 ],
2445 },
2446 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
2447 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
2448 &quot;a_key&quot;: &quot;A String&quot;,
2449 },
2450 },
2451 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
2452 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
2453 &quot;a_key&quot;: &quot;A String&quot;,
2454 },
2455 },
2456 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
2457 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
2458 },
2459 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
2460 &quot;messages&quot;: [ # Messages to be published.
2461 &quot;A String&quot;,
2462 ],
2463 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
2464 },
2465 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
2466 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
2467 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2468 },
2469 },
2470 ],
2471 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
2472 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
2473 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
2474 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
2475 },
2476 },
2477 ],
2478 &quot;matchedRules&quot;: [ # A subset of triggered rules that are evaluated true for a given request.
2479 { # Represents the rule for a content warehouse trigger.
2480 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
2481 { # Represents the action triggered by Rule Engine when the rule is true.
2482 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
2483 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
2484 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
2485 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2486 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
2487 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2488 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
2489 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
2490 &quot;A String&quot;,
2491 ],
2492 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2493 },
2494 ],
2495 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2496 },
2497 ],
2498 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
2499 { # Associates `members`, or principals, with a `role`.
2500 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2501 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2502 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2503 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2504 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2505 },
2506 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2507 &quot;A String&quot;,
2508 ],
2509 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
2510 },
2511 ],
2512 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2513 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2514 },
2515 },
2516 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
2517 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
2518 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2519 &quot;A String&quot;,
2520 ],
2521 },
2522 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
2523 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
2524 &quot;a_key&quot;: &quot;A String&quot;,
2525 },
2526 },
2527 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
2528 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
2529 &quot;a_key&quot;: &quot;A String&quot;,
2530 },
2531 },
2532 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
2533 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
2534 },
2535 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
2536 &quot;messages&quot;: [ # Messages to be published.
2537 &quot;A String&quot;,
2538 ],
2539 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
2540 },
2541 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
2542 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
2543 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2544 },
2545 },
2546 ],
2547 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
2548 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
2549 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
2550 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
2551 },
2552 ],
2553 &quot;triggeredRules&quot;: [ # List of rules fetched from database for the given request trigger type.
2554 { # Represents the rule for a content warehouse trigger.
2555 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
2556 { # Represents the action triggered by Rule Engine when the rule is true.
2557 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
2558 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
2559 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
2560 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2561 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
2562 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2563 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
2564 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
2565 &quot;A String&quot;,
2566 ],
2567 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2568 },
2569 ],
2570 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2571 },
2572 ],
2573 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
2574 { # Associates `members`, or principals, with a `role`.
2575 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2576 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2577 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2578 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2579 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2580 },
2581 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2582 &quot;A String&quot;,
2583 ],
2584 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
2585 },
2586 ],
2587 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2588 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2589 },
2590 },
2591 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
2592 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
2593 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2594 &quot;A String&quot;,
2595 ],
2596 },
2597 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
2598 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
2599 &quot;a_key&quot;: &quot;A String&quot;,
2600 },
2601 },
2602 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
2603 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
2604 &quot;a_key&quot;: &quot;A String&quot;,
2605 },
2606 },
2607 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
2608 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
2609 },
2610 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
2611 &quot;messages&quot;: [ # Messages to be published.
2612 &quot;A String&quot;,
2613 ],
2614 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
2615 },
2616 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
2617 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
2618 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
2619 },
2620 },
2621 ],
2622 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
2623 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
2624 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
2625 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
2626 },
2627 ],
2628 },
2629 },
2630 }</pre>
2631 </div>
2632
2633 <div class="method">
2634 <code class="details" id="delete">delete(name, body=None, x__xgafv=None)</code>
2635 <pre>Deletes a document. Returns NOT_FOUND if the document does not exist.
2636
2637 Args:
2638 name: string, Required. The name of the document to delete. Format: projects/{project_number}/locations/{location}/documents/{document_id} or projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}. (required)
2639 body: object, The request body.
2640 The object takes the form of:
2641
2642 { # Request message for DocumentService.DeleteDocument.
2643 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control for the service.
2644 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
2645 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
2646 &quot;A String&quot;,
2647 ],
2648 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
2649 },
2650 },
2651 }
2652
2653 x__xgafv: string, V1 error format.
2654 Allowed values
2655 1 - v1 error format
2656 2 - v2 error format
2657
2658 Returns:
2659 An object of the form:
2660
2661 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
2662 }</pre>
2663 </div>
2664
2665 <div class="method">
2666 <code class="details" id="fetchAcl">fetchAcl(resource, body=None, x__xgafv=None)</code>
2667 <pre>Gets the access control policy for a resource. Returns NOT_FOUND error if the resource does not exist. Returns an empty policy if the resource exists but does not have a policy set.
2668
2669 Args:
2670 resource: string, Required. REQUIRED: The resource for which the policy is being requested. Format for document: projects/{project_number}/locations/{location}/documents/{document_id}. Format for collection: projects/{project_number}/locations/{location}/collections/{collection_id}. Format for project: projects/{project_number}. (required)
2671 body: object, The request body.
2672 The object takes the form of:
2673
2674 { # Request message for DocumentService.FetchAcl
2675 &quot;projectOwner&quot;: True or False, # For Get Project ACL only. Authorization check for end user will be ignored when project_owner=true.
2676 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control for the service.
2677 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
2678 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
2679 &quot;A String&quot;,
2680 ],
2681 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
2682 },
2683 },
2684 }
2685
2686 x__xgafv: string, V1 error format.
2687 Allowed values
2688 1 - v1 error format
2689 2 - v2 error format
2690
2691 Returns:
2692 An object of the form:
2693
2694 { # Response message for DocumentService.FetchAcl.
2695 &quot;metadata&quot;: { # Additional information returned to client, such as debugging information. # Additional information for the API invocation, such as the request tracking id.
2696 &quot;requestId&quot;: &quot;A String&quot;, # A unique id associated with this call. This id is logged for tracking purpose.
2697 },
2698 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # The IAM policy.
2699 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2700 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
2701 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2702 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
2703 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
2704 &quot;A String&quot;,
2705 ],
2706 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2707 },
2708 ],
2709 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
2710 },
2711 ],
2712 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
2713 { # Associates `members`, or principals, with a `role`.
2714 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2715 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
2716 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2717 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
2718 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
2719 },
2720 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2721 &quot;A String&quot;,
2722 ],
2723 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
2724 },
2725 ],
2726 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
2727 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2728 },
2729 }</pre>
2730 </div>
2731
2732 <div class="method">
2733 <code class="details" id="get">get(name, body=None, x__xgafv=None)</code>
2734 <pre>Gets a document. Returns NOT_FOUND if the document does not exist.
2735
2736 Args:
2737 name: string, Required. The name of the document to retrieve. Format: projects/{project_number}/locations/{location}/documents/{document_id} or projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}. (required)
2738 body: object, The request body.
2739 The object takes the form of:
2740
2741 { # Request message for DocumentService.GetDocument.
2742 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control for the service.
2743 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
2744 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
2745 &quot;A String&quot;,
2746 ],
2747 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
2748 },
2749 },
2750 }
2751
2752 x__xgafv: string, V1 error format.
2753 Allowed values
2754 1 - v1 error format
2755 2 - v2 error format
2756
2757 Returns:
2758 An object of the form:
2759
2760 { # Defines the structure for content warehouse document proto.
2761 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
2762 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
2763 &quot;chunks&quot;: [ # List of chunks.
2764 { # Represents a chunk.
2765 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
2766 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
2767 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
2768 { # Represents the page footer associated with the chunk.
2769 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
2770 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
2771 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
2772 },
2773 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
2774 },
2775 ],
2776 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
2777 { # Represents the page header associated with the chunk.
2778 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
2779 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
2780 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
2781 },
2782 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
2783 },
2784 ],
2785 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
2786 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
2787 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
2788 },
2789 &quot;sourceBlockIds&quot;: [ # Unused.
2790 &quot;A String&quot;,
2791 ],
2792 },
2793 ],
2794 },
2795 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
2796 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
2797 &quot;blocks&quot;: [ # List of blocks in the document.
2798 { # Represents a block. A block could be one of the various types (text, table, list) supported.
2799 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
2800 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
2801 &quot;listEntries&quot;: [ # List entries that constitute a list block.
2802 { # Represents an entry in the list.
2803 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
2804 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
2805 ],
2806 },
2807 ],
2808 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
2809 },
2810 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
2811 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
2812 &quot;pageStart&quot;: 42, # Page where block starts in the document.
2813 },
2814 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
2815 &quot;bodyRows&quot;: [ # Body rows containing main table content.
2816 { # Represents a row in a table.
2817 &quot;cells&quot;: [ # A table row is a list of table cells.
2818 { # Represents a cell in a table row.
2819 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
2820 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
2821 ],
2822 &quot;colSpan&quot;: 42, # How many columns this cell spans.
2823 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
2824 },
2825 ],
2826 },
2827 ],
2828 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
2829 &quot;headerRows&quot;: [ # Header rows at the top of the table.
2830 { # Represents a row in a table.
2831 &quot;cells&quot;: [ # A table row is a list of table cells.
2832 { # Represents a cell in a table row.
2833 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
2834 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
2835 ],
2836 &quot;colSpan&quot;: 42, # How many columns this cell spans.
2837 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
2838 },
2839 ],
2840 },
2841 ],
2842 },
2843 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
2844 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
2845 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
2846 ],
2847 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
2848 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
2849 },
2850 },
2851 ],
2852 },
2853 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
2854 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
2855 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
2856 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
2857 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
2858 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
2859 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
2860 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
2861 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
2862 &quot;A String&quot;,
2863 ],
2864 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
2865 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
2866 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
2867 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
2868 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
2869 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
2870 &quot;A String&quot;,
2871 ],
2872 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
2873 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
2874 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
2875 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
2876 },
2877 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
2878 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
2879 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
2880 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
2881 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
2882 },
2883 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
2884 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
2885 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
2886 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
2887 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
2888 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
2889 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
2890 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
2891 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
2892 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
2893 },
2894 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
2895 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
2896 },
2897 &quot;floatValue&quot;: 3.14, # Float value.
2898 &quot;integerValue&quot;: 42, # Integer value.
2899 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
2900 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
2901 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
2902 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
2903 },
2904 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
2905 },
2906 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
2907 &quot;pageRefs&quot;: [ # One or more references to visual page elements
2908 { # Represents a weak reference to a page element within a document.
2909 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
2910 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
2911 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
2912 &quot;x&quot;: 3.14, # X coordinate.
2913 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
2914 },
2915 ],
2916 &quot;vertices&quot;: [ # The bounding polygon vertices.
2917 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
2918 &quot;x&quot;: 42, # X coordinate.
2919 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
2920 },
2921 ],
2922 },
2923 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
2924 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
2925 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
2926 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
2927 },
2928 ],
2929 },
2930 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
2931 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
2932 ],
2933 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
2934 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
2935 &quot;parents&quot;: [ # References to the original elements that are replaced.
2936 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
2937 &quot;id&quot;: 42, # The id of the parent provenance.
2938 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
2939 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
2940 },
2941 ],
2942 &quot;revision&quot;: 42, # The index of the revision that produced this element.
2943 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
2944 },
2945 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
2946 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
2947 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
2948 &quot;textSegments&quot;: [ # The text segments from the Document.text.
2949 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
2950 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
2951 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
2952 },
2953 ],
2954 },
2955 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
2956 },
2957 ],
2958 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
2959 { # Relationship between Entities.
2960 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
2961 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
2962 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
2963 },
2964 ],
2965 &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). # Any error that occurred while processing this document.
2966 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2967 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
2968 {
2969 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2970 },
2971 ],
2972 &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.
2973 },
2974 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
2975 &quot;pages&quot;: [ # Visual page layout for the Document.
2976 { # A page in a Document.
2977 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
2978 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
2979 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
2980 { # Detected language for a structural component.
2981 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
2982 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
2983 },
2984 ],
2985 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
2986 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
2987 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
2988 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
2989 &quot;x&quot;: 3.14, # X coordinate.
2990 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
2991 },
2992 ],
2993 &quot;vertices&quot;: [ # The bounding polygon vertices.
2994 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
2995 &quot;x&quot;: 42, # X coordinate.
2996 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
2997 },
2998 ],
2999 },
3000 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3001 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3002 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3003 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3004 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3005 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3006 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3007 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3008 },
3009 ],
3010 },
3011 },
3012 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
3013 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3014 &quot;parents&quot;: [ # References to the original elements that are replaced.
3015 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3016 &quot;id&quot;: 42, # The id of the parent provenance.
3017 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3018 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3019 },
3020 ],
3021 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3022 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3023 },
3024 },
3025 ],
3026 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
3027 { # A detected barcode.
3028 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
3029 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
3030 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
3031 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
3032 },
3033 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
3034 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3035 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3036 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3037 &quot;x&quot;: 3.14, # X coordinate.
3038 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3039 },
3040 ],
3041 &quot;vertices&quot;: [ # The bounding polygon vertices.
3042 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3043 &quot;x&quot;: 42, # X coordinate.
3044 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3045 },
3046 ],
3047 },
3048 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3049 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3050 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3051 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3052 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3053 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3054 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3055 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3056 },
3057 ],
3058 },
3059 },
3060 },
3061 ],
3062 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3063 { # Detected language for a structural component.
3064 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3065 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3066 },
3067 ],
3068 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
3069 &quot;height&quot;: 3.14, # Page height.
3070 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
3071 &quot;width&quot;: 3.14, # Page width.
3072 },
3073 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
3074 { # A form field detected on the page.
3075 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
3076 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
3077 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
3078 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3079 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3080 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3081 &quot;x&quot;: 3.14, # X coordinate.
3082 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3083 },
3084 ],
3085 &quot;vertices&quot;: [ # The bounding polygon vertices.
3086 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3087 &quot;x&quot;: 42, # X coordinate.
3088 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3089 },
3090 ],
3091 },
3092 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3093 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3094 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3095 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3096 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3097 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3098 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3099 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3100 },
3101 ],
3102 },
3103 },
3104 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
3105 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3106 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3107 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3108 &quot;x&quot;: 3.14, # X coordinate.
3109 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3110 },
3111 ],
3112 &quot;vertices&quot;: [ # The bounding polygon vertices.
3113 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3114 &quot;x&quot;: 42, # X coordinate.
3115 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3116 },
3117 ],
3118 },
3119 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3120 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3121 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3122 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3123 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3124 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3125 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3126 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3127 },
3128 ],
3129 },
3130 },
3131 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
3132 { # Detected language for a structural component.
3133 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3134 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3135 },
3136 ],
3137 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
3138 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3139 &quot;parents&quot;: [ # References to the original elements that are replaced.
3140 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3141 &quot;id&quot;: 42, # The id of the parent provenance.
3142 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3143 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3144 },
3145 ],
3146 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3147 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3148 },
3149 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
3150 { # Detected language for a structural component.
3151 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3152 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3153 },
3154 ],
3155 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
3156 },
3157 ],
3158 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
3159 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
3160 &quot;height&quot;: 42, # Height of the image in pixels.
3161 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
3162 &quot;width&quot;: 42, # Width of the image in pixels.
3163 },
3164 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
3165 &quot;detectedDefects&quot;: [ # A list of detected defects.
3166 { # Image Quality Defects
3167 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
3168 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
3169 },
3170 ],
3171 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
3172 },
3173 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
3174 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3175 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3176 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3177 &quot;x&quot;: 3.14, # X coordinate.
3178 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3179 },
3180 ],
3181 &quot;vertices&quot;: [ # The bounding polygon vertices.
3182 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3183 &quot;x&quot;: 42, # X coordinate.
3184 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3185 },
3186 ],
3187 },
3188 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3189 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3190 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3191 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3192 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3193 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3194 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3195 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3196 },
3197 ],
3198 },
3199 },
3200 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
3201 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
3202 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3203 { # Detected language for a structural component.
3204 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3205 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3206 },
3207 ],
3208 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
3209 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3210 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3211 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3212 &quot;x&quot;: 3.14, # X coordinate.
3213 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3214 },
3215 ],
3216 &quot;vertices&quot;: [ # The bounding polygon vertices.
3217 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3218 &quot;x&quot;: 42, # X coordinate.
3219 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3220 },
3221 ],
3222 },
3223 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3224 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3225 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3226 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3227 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3228 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3229 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3230 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3231 },
3232 ],
3233 },
3234 },
3235 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
3236 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3237 &quot;parents&quot;: [ # References to the original elements that are replaced.
3238 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3239 &quot;id&quot;: 42, # The id of the parent provenance.
3240 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3241 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3242 },
3243 ],
3244 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3245 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3246 },
3247 },
3248 ],
3249 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
3250 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
3251 { # A collection of lines that a human would perceive as a paragraph.
3252 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3253 { # Detected language for a structural component.
3254 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3255 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3256 },
3257 ],
3258 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
3259 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3260 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3261 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3262 &quot;x&quot;: 3.14, # X coordinate.
3263 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3264 },
3265 ],
3266 &quot;vertices&quot;: [ # The bounding polygon vertices.
3267 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3268 &quot;x&quot;: 42, # X coordinate.
3269 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3270 },
3271 ],
3272 },
3273 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3274 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3275 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3276 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3277 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3278 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3279 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3280 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3281 },
3282 ],
3283 },
3284 },
3285 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
3286 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3287 &quot;parents&quot;: [ # References to the original elements that are replaced.
3288 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3289 &quot;id&quot;: 42, # The id of the parent provenance.
3290 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3291 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3292 },
3293 ],
3294 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3295 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3296 },
3297 },
3298 ],
3299 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
3300 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3301 &quot;parents&quot;: [ # References to the original elements that are replaced.
3302 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3303 &quot;id&quot;: 42, # The id of the parent provenance.
3304 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3305 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3306 },
3307 ],
3308 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3309 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3310 },
3311 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
3312 { # A detected symbol.
3313 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3314 { # Detected language for a structural component.
3315 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3316 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3317 },
3318 ],
3319 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
3320 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3321 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3322 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3323 &quot;x&quot;: 3.14, # X coordinate.
3324 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3325 },
3326 ],
3327 &quot;vertices&quot;: [ # The bounding polygon vertices.
3328 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3329 &quot;x&quot;: 42, # X coordinate.
3330 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3331 },
3332 ],
3333 },
3334 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3335 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3336 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3337 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3338 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3339 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3340 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3341 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3342 },
3343 ],
3344 },
3345 },
3346 },
3347 ],
3348 &quot;tables&quot;: [ # A list of visually detected tables on the page.
3349 { # A table representation similar to HTML table structure.
3350 &quot;bodyRows&quot;: [ # Body rows of the table.
3351 { # A row of table cells.
3352 &quot;cells&quot;: [ # Cells that make up this row.
3353 { # A cell representation inside the table.
3354 &quot;colSpan&quot;: 42, # How many columns this cell spans.
3355 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3356 { # Detected language for a structural component.
3357 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3358 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3359 },
3360 ],
3361 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
3362 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3363 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3364 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3365 &quot;x&quot;: 3.14, # X coordinate.
3366 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3367 },
3368 ],
3369 &quot;vertices&quot;: [ # The bounding polygon vertices.
3370 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3371 &quot;x&quot;: 42, # X coordinate.
3372 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3373 },
3374 ],
3375 },
3376 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3377 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3378 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3379 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3380 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3381 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3382 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3383 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3384 },
3385 ],
3386 },
3387 },
3388 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
3389 },
3390 ],
3391 },
3392 ],
3393 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3394 { # Detected language for a structural component.
3395 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3396 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3397 },
3398 ],
3399 &quot;headerRows&quot;: [ # Header rows of the table.
3400 { # A row of table cells.
3401 &quot;cells&quot;: [ # Cells that make up this row.
3402 { # A cell representation inside the table.
3403 &quot;colSpan&quot;: 42, # How many columns this cell spans.
3404 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3405 { # Detected language for a structural component.
3406 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3407 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3408 },
3409 ],
3410 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
3411 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3412 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3413 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3414 &quot;x&quot;: 3.14, # X coordinate.
3415 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3416 },
3417 ],
3418 &quot;vertices&quot;: [ # The bounding polygon vertices.
3419 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3420 &quot;x&quot;: 42, # X coordinate.
3421 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3422 },
3423 ],
3424 },
3425 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3426 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3427 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3428 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3429 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3430 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3431 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3432 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3433 },
3434 ],
3435 },
3436 },
3437 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
3438 },
3439 ],
3440 },
3441 ],
3442 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
3443 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3444 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3445 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3446 &quot;x&quot;: 3.14, # X coordinate.
3447 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3448 },
3449 ],
3450 &quot;vertices&quot;: [ # The bounding polygon vertices.
3451 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3452 &quot;x&quot;: 42, # X coordinate.
3453 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3454 },
3455 ],
3456 },
3457 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3458 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3459 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3460 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3461 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3462 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3463 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3464 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3465 },
3466 ],
3467 },
3468 },
3469 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
3470 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3471 &quot;parents&quot;: [ # References to the original elements that are replaced.
3472 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3473 &quot;id&quot;: 42, # The id of the parent provenance.
3474 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3475 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3476 },
3477 ],
3478 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3479 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3480 },
3481 },
3482 ],
3483 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
3484 { # A detected token.
3485 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
3486 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
3487 },
3488 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3489 { # Detected language for a structural component.
3490 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3491 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3492 },
3493 ],
3494 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
3495 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3496 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3497 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3498 &quot;x&quot;: 3.14, # X coordinate.
3499 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3500 },
3501 ],
3502 &quot;vertices&quot;: [ # The bounding polygon vertices.
3503 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3504 &quot;x&quot;: 42, # X coordinate.
3505 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3506 },
3507 ],
3508 },
3509 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3510 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3511 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3512 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3513 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3514 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3515 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3516 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3517 },
3518 ],
3519 },
3520 },
3521 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
3522 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3523 &quot;parents&quot;: [ # References to the original elements that are replaced.
3524 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3525 &quot;id&quot;: 42, # The id of the parent provenance.
3526 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3527 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3528 },
3529 ],
3530 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3531 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3532 },
3533 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
3534 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
3535 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
3536 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3537 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
3538 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
3539 },
3540 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
3541 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
3542 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
3543 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
3544 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
3545 &quot;italic&quot;: True or False, # Whether the text is italic.
3546 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
3547 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
3548 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
3549 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
3550 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
3551 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
3552 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
3553 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
3554 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3555 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
3556 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
3557 },
3558 &quot;underlined&quot;: True or False, # Whether the text is underlined.
3559 },
3560 },
3561 ],
3562 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
3563 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
3564 &quot;cols&quot;: 42, # Number of columns in the matrix.
3565 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
3566 &quot;rows&quot;: 42, # Number of rows in the matrix.
3567 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
3568 },
3569 ],
3570 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
3571 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
3572 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
3573 { # Detected language for a structural component.
3574 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
3575 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3576 },
3577 ],
3578 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
3579 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
3580 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
3581 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
3582 &quot;x&quot;: 3.14, # X coordinate.
3583 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
3584 },
3585 ],
3586 &quot;vertices&quot;: [ # The bounding polygon vertices.
3587 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
3588 &quot;x&quot;: 42, # X coordinate.
3589 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
3590 },
3591 ],
3592 },
3593 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
3594 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
3595 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3596 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3597 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3598 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3599 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3600 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3601 },
3602 ],
3603 },
3604 },
3605 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
3606 },
3607 ],
3608 },
3609 ],
3610 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
3611 { # Contains past or forward revisions of this document.
3612 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
3613 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
3614 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
3615 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
3616 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
3617 },
3618 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
3619 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
3620 42,
3621 ],
3622 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
3623 &quot;A String&quot;,
3624 ],
3625 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
3626 },
3627 ],
3628 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
3629 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
3630 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
3631 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
3632 },
3633 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
3634 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
3635 { # This message is used for text changes aka. OCR corrections.
3636 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
3637 &quot;provenance&quot;: [ # The history of this annotation.
3638 { # Structure to identify provenance relationships between annotations in different revisions.
3639 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
3640 &quot;parents&quot;: [ # References to the original elements that are replaced.
3641 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
3642 &quot;id&quot;: 42, # The id of the parent provenance.
3643 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
3644 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
3645 },
3646 ],
3647 &quot;revision&quot;: 42, # The index of the revision that produced this element.
3648 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
3649 },
3650 ],
3651 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
3652 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3653 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3654 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3655 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3656 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3657 },
3658 ],
3659 },
3660 },
3661 ],
3662 &quot;textStyles&quot;: [ # Styles for the Document.text.
3663 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
3664 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
3665 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
3666 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3667 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
3668 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
3669 },
3670 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
3671 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
3672 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
3673 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
3674 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
3675 },
3676 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
3677 &quot;fontSize&quot;: { # Font size with unit. # Font size.
3678 &quot;size&quot;: 3.14, # Font size for the text.
3679 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
3680 },
3681 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
3682 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
3683 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
3684 &quot;textSegments&quot;: [ # The text segments from the Document.text.
3685 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
3686 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
3687 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
3688 },
3689 ],
3690 },
3691 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
3692 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
3693 },
3694 ],
3695 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
3696 },
3697 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
3698 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
3699 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
3700 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
3701 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
3702 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
3703 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
3704 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
3705 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
3706 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
3707 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
3708 &quot;properties&quot;: [ # List of values that are user supplied metadata.
3709 { # Property of a document.
3710 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
3711 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
3712 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
3713 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
3714 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
3715 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
3716 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
3717 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
3718 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
3719 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
3720 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
3721 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
3722 },
3723 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
3724 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
3725 },
3726 ],
3727 },
3728 &quot;enumValues&quot;: { # Enum values. # Enum property values.
3729 &quot;values&quot;: [ # List of enum values.
3730 &quot;A String&quot;,
3731 ],
3732 },
3733 &quot;floatValues&quot;: { # Float values. # Float property values.
3734 &quot;values&quot;: [ # List of float values.
3735 3.14,
3736 ],
3737 },
3738 &quot;integerValues&quot;: { # Integer values. # Integer property values.
3739 &quot;values&quot;: [ # List of integer values.
3740 42,
3741 ],
3742 },
3743 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
3744 &quot;fields&quot;: { # Unordered map of dynamically typed values.
3745 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
3746 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
3747 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
3748 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
3749 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
3750 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
3751 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
3752 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
3753 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
3754 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
3755 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
3756 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
3757 },
3758 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
3759 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
3760 },
3761 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
3762 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
3763 },
3764 &quot;floatValue&quot;: 3.14, # Represents a float value.
3765 &quot;intValue&quot;: 42, # Represents a integer value.
3766 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
3767 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
3768 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
3769 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
3770 },
3771 },
3772 },
3773 },
3774 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
3775 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
3776 &quot;properties&quot;: [ # List of property values.
3777 # Object with schema name: GoogleCloudContentwarehouseV1Property
3778 ],
3779 },
3780 &quot;textValues&quot;: { # String/text values. # String/text property values.
3781 &quot;values&quot;: [ # List of text values.
3782 &quot;A String&quot;,
3783 ],
3784 },
3785 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
3786 &quot;values&quot;: [ # List of timestamp values.
3787 { # Timestamp value type.
3788 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
3789 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
3790 },
3791 ],
3792 },
3793 },
3794 ],
3795 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
3796 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
3797 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
3798 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
3799 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
3800 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
3801 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
3802 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
3803 }</pre>
3804 </div>
3805
3806 <div class="method">
3807 <code class="details" id="linkedSources">linkedSources(parent, body=None, x__xgafv=None)</code>
3808 <pre>Return all source document-links from the document.
3809
3810 Args:
3811 parent: string, Required. The name of the document, for which all source links are returned. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}. (required)
3812 body: object, The request body.
3813 The object takes the form of:
3814
3815 { # Response message for DocumentLinkService.ListLinkedSources.
3816 &quot;pageSize&quot;: 42, # The maximum number of document-links to return. The service may return fewer than this value. If unspecified, at most 50 document-links will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
3817 &quot;pageToken&quot;: &quot;A String&quot;, # A page token, received from a previous `ListLinkedSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListLinkedSources` must match the call that provided the page token.
3818 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the document creator, used to enforce access control for the service.
3819 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
3820 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
3821 &quot;A String&quot;,
3822 ],
3823 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
3824 },
3825 },
3826 }
3827
3828 x__xgafv: string, V1 error format.
3829 Allowed values
3830 1 - v1 error format
3831 2 - v2 error format
3832
3833 Returns:
3834 An object of the form:
3835
3836 { # Response message for DocumentLinkService.ListLinkedSources.
3837 &quot;documentLinks&quot;: [ # Source document-links.
3838 { # A document-link between source and target document.
3839 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the documentLink is created.
3840 &quot;description&quot;: &quot;A String&quot;, # Description of this document-link.
3841 &quot;name&quot;: &quot;A String&quot;, # Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.
3842 &quot;sourceDocumentReference&quot;: { # References to the documents. # Document references of the source document.
3843 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
3844 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time when the document is deleted.
3845 &quot;displayName&quot;: &quot;A String&quot;, # display_name of the referenced document; this name does not need to be consistent to the display_name in the Document proto, depending on the ACL constraint.
3846 &quot;documentIsFolder&quot;: True or False, # The document type of the document being referenced.
3847 &quot;documentIsLegalHoldFolder&quot;: True or False, # Document is a folder with legal hold.
3848 &quot;documentIsRetentionFolder&quot;: True or False, # Document is a folder with retention policy.
3849 &quot;documentName&quot;: &quot;A String&quot;, # Required. Name of the referenced document.
3850 &quot;snippet&quot;: &quot;A String&quot;, # Stores the subset of the referenced document&#x27;s content. This is useful to allow user peek the information of the referenced document.
3851 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
3852 },
3853 &quot;state&quot;: &quot;A String&quot;, # The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.
3854 &quot;targetDocumentReference&quot;: { # References to the documents. # Document references of the target document.
3855 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
3856 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time when the document is deleted.
3857 &quot;displayName&quot;: &quot;A String&quot;, # display_name of the referenced document; this name does not need to be consistent to the display_name in the Document proto, depending on the ACL constraint.
3858 &quot;documentIsFolder&quot;: True or False, # The document type of the document being referenced.
3859 &quot;documentIsLegalHoldFolder&quot;: True or False, # Document is a folder with legal hold.
3860 &quot;documentIsRetentionFolder&quot;: True or False, # Document is a folder with retention policy.
3861 &quot;documentName&quot;: &quot;A String&quot;, # Required. Name of the referenced document.
3862 &quot;snippet&quot;: &quot;A String&quot;, # Stores the subset of the referenced document&#x27;s content. This is useful to allow user peek the information of the referenced document.
3863 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
3864 },
3865 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the documentLink is last updated.
3866 },
3867 ],
3868 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
3869 }</pre>
3870 </div>
3871
3872 <div class="method">
3873 <code class="details" id="linkedSources_next">linkedSources_next()</code>
3874 <pre>Retrieves the next page of results.
3875
3876 Args:
3877 previous_request: The request for the previous page. (required)
3878 previous_response: The response from the request for the previous page. (required)
3879
3880 Returns:
3881 A request object that you can call &#x27;execute()&#x27; on to request the next
3882 page. Returns None if there are no more items in the collection.
3883 </pre>
3884 </div>
3885
3886 <div class="method">
3887 <code class="details" id="linkedTargets">linkedTargets(parent, body=None, x__xgafv=None)</code>
3888 <pre>Return all target document-links from the document.
3889
3890 Args:
3891 parent: string, Required. The name of the document, for which all target links are returned. Format: projects/{project_number}/locations/{location}/documents/{target_document_id}. (required)
3892 body: object, The request body.
3893 The object takes the form of:
3894
3895 { # Request message for DocumentLinkService.ListLinkedTargets.
3896 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the document creator, used to enforce access control for the service.
3897 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
3898 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
3899 &quot;A String&quot;,
3900 ],
3901 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
3902 },
3903 },
3904 }
3905
3906 x__xgafv: string, V1 error format.
3907 Allowed values
3908 1 - v1 error format
3909 2 - v2 error format
3910
3911 Returns:
3912 An object of the form:
3913
3914 { # Response message for DocumentLinkService.ListLinkedTargets.
3915 &quot;documentLinks&quot;: [ # Target document-links.
3916 { # A document-link between source and target document.
3917 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the documentLink is created.
3918 &quot;description&quot;: &quot;A String&quot;, # Description of this document-link.
3919 &quot;name&quot;: &quot;A String&quot;, # Name of this document-link. It is required that the parent derived form the name to be consistent with the source document reference. Otherwise an exception will be thrown. Format: projects/{project_number}/locations/{location}/documents/{source_document_id}/documentLinks/{document_link_id}.
3920 &quot;sourceDocumentReference&quot;: { # References to the documents. # Document references of the source document.
3921 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
3922 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time when the document is deleted.
3923 &quot;displayName&quot;: &quot;A String&quot;, # display_name of the referenced document; this name does not need to be consistent to the display_name in the Document proto, depending on the ACL constraint.
3924 &quot;documentIsFolder&quot;: True or False, # The document type of the document being referenced.
3925 &quot;documentIsLegalHoldFolder&quot;: True or False, # Document is a folder with legal hold.
3926 &quot;documentIsRetentionFolder&quot;: True or False, # Document is a folder with retention policy.
3927 &quot;documentName&quot;: &quot;A String&quot;, # Required. Name of the referenced document.
3928 &quot;snippet&quot;: &quot;A String&quot;, # Stores the subset of the referenced document&#x27;s content. This is useful to allow user peek the information of the referenced document.
3929 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
3930 },
3931 &quot;state&quot;: &quot;A String&quot;, # The state of the documentlink. If target node has been deleted, the link is marked as invalid. Removing a source node will result in removal of all associated links.
3932 &quot;targetDocumentReference&quot;: { # References to the documents. # Document references of the target document.
3933 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
3934 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The time when the document is deleted.
3935 &quot;displayName&quot;: &quot;A String&quot;, # display_name of the referenced document; this name does not need to be consistent to the display_name in the Document proto, depending on the ACL constraint.
3936 &quot;documentIsFolder&quot;: True or False, # The document type of the document being referenced.
3937 &quot;documentIsLegalHoldFolder&quot;: True or False, # Document is a folder with legal hold.
3938 &quot;documentIsRetentionFolder&quot;: True or False, # Document is a folder with retention policy.
3939 &quot;documentName&quot;: &quot;A String&quot;, # Required. Name of the referenced document.
3940 &quot;snippet&quot;: &quot;A String&quot;, # Stores the subset of the referenced document&#x27;s content. This is useful to allow user peek the information of the referenced document.
3941 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
3942 },
3943 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the documentLink is last updated.
3944 },
3945 ],
3946 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
3947 }</pre>
3948 </div>
3949
3950 <div class="method">
3951 <code class="details" id="lock">lock(name, body=None, x__xgafv=None)</code>
3952 <pre>Lock the document so the document cannot be updated by other users.
3953
3954 Args:
3955 name: string, Required. The name of the document to lock. Format: projects/{project_number}/locations/{location}/documents/{document}. (required)
3956 body: object, The request body.
3957 The object takes the form of:
3958
3959 { # Request message for DocumentService.LockDocument.
3960 &quot;collectionId&quot;: &quot;A String&quot;, # The collection the document connects to.
3961 &quot;lockingUser&quot;: { # The user information. # The user information who locks the document.
3962 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
3963 &quot;A String&quot;,
3964 ],
3965 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
3966 },
3967 }
3968
3969 x__xgafv: string, V1 error format.
3970 Allowed values
3971 1 - v1 error format
3972 2 - v2 error format
3973
3974 Returns:
3975 An object of the form:
3976
3977 { # Defines the structure for content warehouse document proto.
3978 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
3979 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
3980 &quot;chunks&quot;: [ # List of chunks.
3981 { # Represents a chunk.
3982 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
3983 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
3984 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
3985 { # Represents the page footer associated with the chunk.
3986 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
3987 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
3988 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
3989 },
3990 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
3991 },
3992 ],
3993 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
3994 { # Represents the page header associated with the chunk.
3995 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
3996 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
3997 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
3998 },
3999 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
4000 },
4001 ],
4002 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
4003 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
4004 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
4005 },
4006 &quot;sourceBlockIds&quot;: [ # Unused.
4007 &quot;A String&quot;,
4008 ],
4009 },
4010 ],
4011 },
4012 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
4013 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
4014 &quot;blocks&quot;: [ # List of blocks in the document.
4015 { # Represents a block. A block could be one of the various types (text, table, list) supported.
4016 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
4017 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
4018 &quot;listEntries&quot;: [ # List entries that constitute a list block.
4019 { # Represents an entry in the list.
4020 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
4021 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
4022 ],
4023 },
4024 ],
4025 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
4026 },
4027 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
4028 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
4029 &quot;pageStart&quot;: 42, # Page where block starts in the document.
4030 },
4031 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
4032 &quot;bodyRows&quot;: [ # Body rows containing main table content.
4033 { # Represents a row in a table.
4034 &quot;cells&quot;: [ # A table row is a list of table cells.
4035 { # Represents a cell in a table row.
4036 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
4037 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
4038 ],
4039 &quot;colSpan&quot;: 42, # How many columns this cell spans.
4040 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
4041 },
4042 ],
4043 },
4044 ],
4045 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
4046 &quot;headerRows&quot;: [ # Header rows at the top of the table.
4047 { # Represents a row in a table.
4048 &quot;cells&quot;: [ # A table row is a list of table cells.
4049 { # Represents a cell in a table row.
4050 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
4051 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
4052 ],
4053 &quot;colSpan&quot;: 42, # How many columns this cell spans.
4054 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
4055 },
4056 ],
4057 },
4058 ],
4059 },
4060 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
4061 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
4062 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
4063 ],
4064 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
4065 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
4066 },
4067 },
4068 ],
4069 },
4070 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
4071 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
4072 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
4073 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
4074 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
4075 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
4076 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
4077 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
4078 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
4079 &quot;A String&quot;,
4080 ],
4081 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
4082 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
4083 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
4084 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
4085 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
4086 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
4087 &quot;A String&quot;,
4088 ],
4089 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
4090 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
4091 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
4092 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
4093 },
4094 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
4095 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
4096 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
4097 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
4098 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
4099 },
4100 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
4101 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
4102 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
4103 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
4104 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
4105 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
4106 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
4107 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
4108 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
4109 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
4110 },
4111 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
4112 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
4113 },
4114 &quot;floatValue&quot;: 3.14, # Float value.
4115 &quot;integerValue&quot;: 42, # Integer value.
4116 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
4117 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
4118 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
4119 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
4120 },
4121 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
4122 },
4123 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
4124 &quot;pageRefs&quot;: [ # One or more references to visual page elements
4125 { # Represents a weak reference to a page element within a document.
4126 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
4127 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4128 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4129 &quot;x&quot;: 3.14, # X coordinate.
4130 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4131 },
4132 ],
4133 &quot;vertices&quot;: [ # The bounding polygon vertices.
4134 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4135 &quot;x&quot;: 42, # X coordinate.
4136 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4137 },
4138 ],
4139 },
4140 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
4141 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
4142 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
4143 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
4144 },
4145 ],
4146 },
4147 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
4148 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
4149 ],
4150 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
4151 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4152 &quot;parents&quot;: [ # References to the original elements that are replaced.
4153 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4154 &quot;id&quot;: 42, # The id of the parent provenance.
4155 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4156 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4157 },
4158 ],
4159 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4160 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4161 },
4162 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
4163 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
4164 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4165 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4166 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4167 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4168 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4169 },
4170 ],
4171 },
4172 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
4173 },
4174 ],
4175 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
4176 { # Relationship between Entities.
4177 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
4178 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
4179 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
4180 },
4181 ],
4182 &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). # Any error that occurred while processing this document.
4183 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
4184 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
4185 {
4186 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
4187 },
4188 ],
4189 &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.
4190 },
4191 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
4192 &quot;pages&quot;: [ # Visual page layout for the Document.
4193 { # A page in a Document.
4194 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
4195 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
4196 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4197 { # Detected language for a structural component.
4198 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4199 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4200 },
4201 ],
4202 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
4203 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4204 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4205 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4206 &quot;x&quot;: 3.14, # X coordinate.
4207 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4208 },
4209 ],
4210 &quot;vertices&quot;: [ # The bounding polygon vertices.
4211 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4212 &quot;x&quot;: 42, # X coordinate.
4213 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4214 },
4215 ],
4216 },
4217 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4218 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4219 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4220 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4221 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4222 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4223 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4224 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4225 },
4226 ],
4227 },
4228 },
4229 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
4230 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4231 &quot;parents&quot;: [ # References to the original elements that are replaced.
4232 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4233 &quot;id&quot;: 42, # The id of the parent provenance.
4234 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4235 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4236 },
4237 ],
4238 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4239 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4240 },
4241 },
4242 ],
4243 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
4244 { # A detected barcode.
4245 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
4246 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
4247 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
4248 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
4249 },
4250 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
4251 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4252 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4253 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4254 &quot;x&quot;: 3.14, # X coordinate.
4255 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4256 },
4257 ],
4258 &quot;vertices&quot;: [ # The bounding polygon vertices.
4259 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4260 &quot;x&quot;: 42, # X coordinate.
4261 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4262 },
4263 ],
4264 },
4265 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4266 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4267 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4268 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4269 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4270 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4271 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4272 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4273 },
4274 ],
4275 },
4276 },
4277 },
4278 ],
4279 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4280 { # Detected language for a structural component.
4281 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4282 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4283 },
4284 ],
4285 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
4286 &quot;height&quot;: 3.14, # Page height.
4287 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
4288 &quot;width&quot;: 3.14, # Page width.
4289 },
4290 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
4291 { # A form field detected on the page.
4292 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
4293 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
4294 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
4295 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4296 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4297 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4298 &quot;x&quot;: 3.14, # X coordinate.
4299 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4300 },
4301 ],
4302 &quot;vertices&quot;: [ # The bounding polygon vertices.
4303 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4304 &quot;x&quot;: 42, # X coordinate.
4305 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4306 },
4307 ],
4308 },
4309 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4310 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4311 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4312 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4313 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4314 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4315 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4316 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4317 },
4318 ],
4319 },
4320 },
4321 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
4322 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4323 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4324 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4325 &quot;x&quot;: 3.14, # X coordinate.
4326 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4327 },
4328 ],
4329 &quot;vertices&quot;: [ # The bounding polygon vertices.
4330 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4331 &quot;x&quot;: 42, # X coordinate.
4332 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4333 },
4334 ],
4335 },
4336 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4337 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4338 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4339 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4340 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4341 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4342 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4343 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4344 },
4345 ],
4346 },
4347 },
4348 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
4349 { # Detected language for a structural component.
4350 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4351 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4352 },
4353 ],
4354 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
4355 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4356 &quot;parents&quot;: [ # References to the original elements that are replaced.
4357 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4358 &quot;id&quot;: 42, # The id of the parent provenance.
4359 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4360 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4361 },
4362 ],
4363 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4364 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4365 },
4366 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
4367 { # Detected language for a structural component.
4368 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4369 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4370 },
4371 ],
4372 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
4373 },
4374 ],
4375 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
4376 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
4377 &quot;height&quot;: 42, # Height of the image in pixels.
4378 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
4379 &quot;width&quot;: 42, # Width of the image in pixels.
4380 },
4381 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
4382 &quot;detectedDefects&quot;: [ # A list of detected defects.
4383 { # Image Quality Defects
4384 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
4385 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
4386 },
4387 ],
4388 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
4389 },
4390 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
4391 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4392 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4393 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4394 &quot;x&quot;: 3.14, # X coordinate.
4395 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4396 },
4397 ],
4398 &quot;vertices&quot;: [ # The bounding polygon vertices.
4399 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4400 &quot;x&quot;: 42, # X coordinate.
4401 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4402 },
4403 ],
4404 },
4405 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4406 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4407 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4408 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4409 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4410 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4411 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4412 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4413 },
4414 ],
4415 },
4416 },
4417 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
4418 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
4419 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4420 { # Detected language for a structural component.
4421 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4422 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4423 },
4424 ],
4425 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
4426 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4427 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4428 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4429 &quot;x&quot;: 3.14, # X coordinate.
4430 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4431 },
4432 ],
4433 &quot;vertices&quot;: [ # The bounding polygon vertices.
4434 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4435 &quot;x&quot;: 42, # X coordinate.
4436 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4437 },
4438 ],
4439 },
4440 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4441 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4442 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4443 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4444 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4445 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4446 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4447 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4448 },
4449 ],
4450 },
4451 },
4452 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
4453 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4454 &quot;parents&quot;: [ # References to the original elements that are replaced.
4455 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4456 &quot;id&quot;: 42, # The id of the parent provenance.
4457 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4458 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4459 },
4460 ],
4461 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4462 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4463 },
4464 },
4465 ],
4466 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
4467 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
4468 { # A collection of lines that a human would perceive as a paragraph.
4469 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4470 { # Detected language for a structural component.
4471 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4472 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4473 },
4474 ],
4475 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
4476 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4477 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4478 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4479 &quot;x&quot;: 3.14, # X coordinate.
4480 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4481 },
4482 ],
4483 &quot;vertices&quot;: [ # The bounding polygon vertices.
4484 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4485 &quot;x&quot;: 42, # X coordinate.
4486 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4487 },
4488 ],
4489 },
4490 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4491 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4492 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4493 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4494 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4495 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4496 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4497 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4498 },
4499 ],
4500 },
4501 },
4502 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
4503 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4504 &quot;parents&quot;: [ # References to the original elements that are replaced.
4505 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4506 &quot;id&quot;: 42, # The id of the parent provenance.
4507 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4508 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4509 },
4510 ],
4511 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4512 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4513 },
4514 },
4515 ],
4516 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
4517 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4518 &quot;parents&quot;: [ # References to the original elements that are replaced.
4519 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4520 &quot;id&quot;: 42, # The id of the parent provenance.
4521 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4522 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4523 },
4524 ],
4525 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4526 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4527 },
4528 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
4529 { # A detected symbol.
4530 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4531 { # Detected language for a structural component.
4532 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4533 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4534 },
4535 ],
4536 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
4537 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4538 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4539 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4540 &quot;x&quot;: 3.14, # X coordinate.
4541 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4542 },
4543 ],
4544 &quot;vertices&quot;: [ # The bounding polygon vertices.
4545 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4546 &quot;x&quot;: 42, # X coordinate.
4547 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4548 },
4549 ],
4550 },
4551 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4552 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4553 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4554 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4555 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4556 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4557 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4558 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4559 },
4560 ],
4561 },
4562 },
4563 },
4564 ],
4565 &quot;tables&quot;: [ # A list of visually detected tables on the page.
4566 { # A table representation similar to HTML table structure.
4567 &quot;bodyRows&quot;: [ # Body rows of the table.
4568 { # A row of table cells.
4569 &quot;cells&quot;: [ # Cells that make up this row.
4570 { # A cell representation inside the table.
4571 &quot;colSpan&quot;: 42, # How many columns this cell spans.
4572 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4573 { # Detected language for a structural component.
4574 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4575 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4576 },
4577 ],
4578 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
4579 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4580 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4581 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4582 &quot;x&quot;: 3.14, # X coordinate.
4583 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4584 },
4585 ],
4586 &quot;vertices&quot;: [ # The bounding polygon vertices.
4587 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4588 &quot;x&quot;: 42, # X coordinate.
4589 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4590 },
4591 ],
4592 },
4593 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4594 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4595 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4596 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4597 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4598 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4599 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4600 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4601 },
4602 ],
4603 },
4604 },
4605 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
4606 },
4607 ],
4608 },
4609 ],
4610 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4611 { # Detected language for a structural component.
4612 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4613 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4614 },
4615 ],
4616 &quot;headerRows&quot;: [ # Header rows of the table.
4617 { # A row of table cells.
4618 &quot;cells&quot;: [ # Cells that make up this row.
4619 { # A cell representation inside the table.
4620 &quot;colSpan&quot;: 42, # How many columns this cell spans.
4621 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4622 { # Detected language for a structural component.
4623 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4624 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4625 },
4626 ],
4627 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
4628 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4629 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4630 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4631 &quot;x&quot;: 3.14, # X coordinate.
4632 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4633 },
4634 ],
4635 &quot;vertices&quot;: [ # The bounding polygon vertices.
4636 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4637 &quot;x&quot;: 42, # X coordinate.
4638 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4639 },
4640 ],
4641 },
4642 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4643 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4644 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4645 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4646 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4647 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4648 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4649 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4650 },
4651 ],
4652 },
4653 },
4654 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
4655 },
4656 ],
4657 },
4658 ],
4659 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
4660 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4661 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4662 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4663 &quot;x&quot;: 3.14, # X coordinate.
4664 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4665 },
4666 ],
4667 &quot;vertices&quot;: [ # The bounding polygon vertices.
4668 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4669 &quot;x&quot;: 42, # X coordinate.
4670 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4671 },
4672 ],
4673 },
4674 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4675 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4676 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4677 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4678 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4679 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4680 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4681 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4682 },
4683 ],
4684 },
4685 },
4686 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
4687 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4688 &quot;parents&quot;: [ # References to the original elements that are replaced.
4689 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4690 &quot;id&quot;: 42, # The id of the parent provenance.
4691 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4692 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4693 },
4694 ],
4695 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4696 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4697 },
4698 },
4699 ],
4700 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
4701 { # A detected token.
4702 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
4703 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
4704 },
4705 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4706 { # Detected language for a structural component.
4707 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4708 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4709 },
4710 ],
4711 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
4712 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4713 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4714 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4715 &quot;x&quot;: 3.14, # X coordinate.
4716 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4717 },
4718 ],
4719 &quot;vertices&quot;: [ # The bounding polygon vertices.
4720 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4721 &quot;x&quot;: 42, # X coordinate.
4722 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4723 },
4724 ],
4725 },
4726 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4727 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4728 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4729 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4730 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4731 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4732 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4733 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4734 },
4735 ],
4736 },
4737 },
4738 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
4739 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4740 &quot;parents&quot;: [ # References to the original elements that are replaced.
4741 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4742 &quot;id&quot;: 42, # The id of the parent provenance.
4743 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4744 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4745 },
4746 ],
4747 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4748 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4749 },
4750 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
4751 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
4752 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
4753 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4754 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
4755 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
4756 },
4757 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
4758 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
4759 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
4760 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
4761 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
4762 &quot;italic&quot;: True or False, # Whether the text is italic.
4763 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
4764 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
4765 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
4766 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
4767 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
4768 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
4769 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
4770 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
4771 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4772 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
4773 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
4774 },
4775 &quot;underlined&quot;: True or False, # Whether the text is underlined.
4776 },
4777 },
4778 ],
4779 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
4780 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
4781 &quot;cols&quot;: 42, # Number of columns in the matrix.
4782 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
4783 &quot;rows&quot;: 42, # Number of rows in the matrix.
4784 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
4785 },
4786 ],
4787 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
4788 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
4789 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
4790 { # Detected language for a structural component.
4791 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
4792 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
4793 },
4794 ],
4795 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
4796 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
4797 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
4798 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
4799 &quot;x&quot;: 3.14, # X coordinate.
4800 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
4801 },
4802 ],
4803 &quot;vertices&quot;: [ # The bounding polygon vertices.
4804 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
4805 &quot;x&quot;: 42, # X coordinate.
4806 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
4807 },
4808 ],
4809 },
4810 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
4811 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
4812 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4813 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4814 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4815 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4816 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4817 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4818 },
4819 ],
4820 },
4821 },
4822 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
4823 },
4824 ],
4825 },
4826 ],
4827 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
4828 { # Contains past or forward revisions of this document.
4829 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
4830 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
4831 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
4832 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
4833 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
4834 },
4835 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
4836 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
4837 42,
4838 ],
4839 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
4840 &quot;A String&quot;,
4841 ],
4842 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
4843 },
4844 ],
4845 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
4846 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
4847 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
4848 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
4849 },
4850 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
4851 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
4852 { # This message is used for text changes aka. OCR corrections.
4853 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
4854 &quot;provenance&quot;: [ # The history of this annotation.
4855 { # Structure to identify provenance relationships between annotations in different revisions.
4856 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
4857 &quot;parents&quot;: [ # References to the original elements that are replaced.
4858 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
4859 &quot;id&quot;: 42, # The id of the parent provenance.
4860 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
4861 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
4862 },
4863 ],
4864 &quot;revision&quot;: 42, # The index of the revision that produced this element.
4865 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
4866 },
4867 ],
4868 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
4869 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4870 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4871 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4872 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4873 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4874 },
4875 ],
4876 },
4877 },
4878 ],
4879 &quot;textStyles&quot;: [ # Styles for the Document.text.
4880 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
4881 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
4882 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
4883 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4884 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
4885 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
4886 },
4887 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
4888 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
4889 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
4890 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
4891 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
4892 },
4893 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
4894 &quot;fontSize&quot;: { # Font size with unit. # Font size.
4895 &quot;size&quot;: 3.14, # Font size for the text.
4896 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
4897 },
4898 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
4899 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
4900 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
4901 &quot;textSegments&quot;: [ # The text segments from the Document.text.
4902 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
4903 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
4904 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
4905 },
4906 ],
4907 },
4908 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
4909 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
4910 },
4911 ],
4912 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
4913 },
4914 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
4915 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
4916 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
4917 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
4918 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
4919 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
4920 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
4921 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
4922 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
4923 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
4924 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
4925 &quot;properties&quot;: [ # List of values that are user supplied metadata.
4926 { # Property of a document.
4927 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
4928 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
4929 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
4930 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
4931 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
4932 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
4933 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
4934 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
4935 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
4936 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
4937 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
4938 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
4939 },
4940 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
4941 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
4942 },
4943 ],
4944 },
4945 &quot;enumValues&quot;: { # Enum values. # Enum property values.
4946 &quot;values&quot;: [ # List of enum values.
4947 &quot;A String&quot;,
4948 ],
4949 },
4950 &quot;floatValues&quot;: { # Float values. # Float property values.
4951 &quot;values&quot;: [ # List of float values.
4952 3.14,
4953 ],
4954 },
4955 &quot;integerValues&quot;: { # Integer values. # Integer property values.
4956 &quot;values&quot;: [ # List of integer values.
4957 42,
4958 ],
4959 },
4960 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
4961 &quot;fields&quot;: { # Unordered map of dynamically typed values.
4962 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
4963 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
4964 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
4965 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
4966 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
4967 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
4968 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
4969 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
4970 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
4971 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
4972 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
4973 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
4974 },
4975 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
4976 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
4977 },
4978 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
4979 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
4980 },
4981 &quot;floatValue&quot;: 3.14, # Represents a float value.
4982 &quot;intValue&quot;: 42, # Represents a integer value.
4983 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
4984 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
4985 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
4986 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
4987 },
4988 },
4989 },
4990 },
4991 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
4992 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
4993 &quot;properties&quot;: [ # List of property values.
4994 # Object with schema name: GoogleCloudContentwarehouseV1Property
4995 ],
4996 },
4997 &quot;textValues&quot;: { # String/text values. # String/text property values.
4998 &quot;values&quot;: [ # List of text values.
4999 &quot;A String&quot;,
5000 ],
5001 },
5002 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
5003 &quot;values&quot;: [ # List of timestamp values.
5004 { # Timestamp value type.
5005 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
5006 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
5007 },
5008 ],
5009 },
5010 },
5011 ],
5012 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
5013 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
5014 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
5015 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
5016 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
5017 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
5018 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
5019 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
5020 }</pre>
5021 </div>
5022
5023 <div class="method">
5024 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
5025 <pre>Updates a document. Returns INVALID_ARGUMENT if the name of the document is non-empty and does not equal the existing name.
5026
5027 Args:
5028 name: string, Required. The name of the document to update. Format: projects/{project_number}/locations/{location}/documents/{document_id} or projects/{project_number}/locations/{location}/documents/referenceId/{reference_id}. (required)
5029 body: object, The request body.
5030 The object takes the form of:
5031
5032 { # Request message for DocumentService.UpdateDocument.
5033 &quot;cloudAiDocumentOption&quot;: { # Request Option for processing Cloud AI Document in CW Document. # Request Option for processing Cloud AI Document in Document Warehouse. This field offers limited support for mapping entities from Cloud AI Document to Warehouse Document. Please consult with product team before using this field and other available options.
5034 &quot;customizedEntitiesPropertiesConversions&quot;: { # If set, only selected entities will be converted to properties.
5035 &quot;a_key&quot;: &quot;A String&quot;,
5036 },
5037 &quot;enableEntitiesConversions&quot;: True or False, # Whether to convert all the entities to properties.
5038 },
5039 &quot;document&quot;: { # Defines the structure for content warehouse document proto. # Required. The document to update.
5040 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
5041 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
5042 &quot;chunks&quot;: [ # List of chunks.
5043 { # Represents a chunk.
5044 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
5045 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
5046 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
5047 { # Represents the page footer associated with the chunk.
5048 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
5049 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
5050 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
5051 },
5052 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
5053 },
5054 ],
5055 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
5056 { # Represents the page header associated with the chunk.
5057 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
5058 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
5059 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
5060 },
5061 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
5062 },
5063 ],
5064 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
5065 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
5066 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
5067 },
5068 &quot;sourceBlockIds&quot;: [ # Unused.
5069 &quot;A String&quot;,
5070 ],
5071 },
5072 ],
5073 },
5074 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
5075 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
5076 &quot;blocks&quot;: [ # List of blocks in the document.
5077 { # Represents a block. A block could be one of the various types (text, table, list) supported.
5078 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
5079 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
5080 &quot;listEntries&quot;: [ # List entries that constitute a list block.
5081 { # Represents an entry in the list.
5082 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
5083 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
5084 ],
5085 },
5086 ],
5087 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
5088 },
5089 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
5090 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
5091 &quot;pageStart&quot;: 42, # Page where block starts in the document.
5092 },
5093 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
5094 &quot;bodyRows&quot;: [ # Body rows containing main table content.
5095 { # Represents a row in a table.
5096 &quot;cells&quot;: [ # A table row is a list of table cells.
5097 { # Represents a cell in a table row.
5098 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
5099 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
5100 ],
5101 &quot;colSpan&quot;: 42, # How many columns this cell spans.
5102 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
5103 },
5104 ],
5105 },
5106 ],
5107 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
5108 &quot;headerRows&quot;: [ # Header rows at the top of the table.
5109 { # Represents a row in a table.
5110 &quot;cells&quot;: [ # A table row is a list of table cells.
5111 { # Represents a cell in a table row.
5112 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
5113 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
5114 ],
5115 &quot;colSpan&quot;: 42, # How many columns this cell spans.
5116 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
5117 },
5118 ],
5119 },
5120 ],
5121 },
5122 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
5123 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
5124 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
5125 ],
5126 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
5127 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
5128 },
5129 },
5130 ],
5131 },
5132 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
5133 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
5134 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
5135 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
5136 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
5137 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
5138 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
5139 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
5140 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
5141 &quot;A String&quot;,
5142 ],
5143 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
5144 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
5145 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
5146 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
5147 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
5148 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
5149 &quot;A String&quot;,
5150 ],
5151 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
5152 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
5153 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
5154 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
5155 },
5156 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
5157 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
5158 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
5159 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
5160 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
5161 },
5162 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
5163 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
5164 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
5165 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
5166 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
5167 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
5168 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
5169 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
5170 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
5171 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
5172 },
5173 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
5174 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
5175 },
5176 &quot;floatValue&quot;: 3.14, # Float value.
5177 &quot;integerValue&quot;: 42, # Integer value.
5178 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
5179 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
5180 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
5181 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
5182 },
5183 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
5184 },
5185 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
5186 &quot;pageRefs&quot;: [ # One or more references to visual page elements
5187 { # Represents a weak reference to a page element within a document.
5188 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
5189 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5190 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5191 &quot;x&quot;: 3.14, # X coordinate.
5192 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5193 },
5194 ],
5195 &quot;vertices&quot;: [ # The bounding polygon vertices.
5196 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5197 &quot;x&quot;: 42, # X coordinate.
5198 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5199 },
5200 ],
5201 },
5202 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
5203 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
5204 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
5205 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
5206 },
5207 ],
5208 },
5209 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
5210 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
5211 ],
5212 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
5213 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5214 &quot;parents&quot;: [ # References to the original elements that are replaced.
5215 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5216 &quot;id&quot;: 42, # The id of the parent provenance.
5217 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5218 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5219 },
5220 ],
5221 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5222 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5223 },
5224 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
5225 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
5226 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5227 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5228 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5229 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5230 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5231 },
5232 ],
5233 },
5234 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
5235 },
5236 ],
5237 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
5238 { # Relationship between Entities.
5239 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
5240 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
5241 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
5242 },
5243 ],
5244 &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). # Any error that occurred while processing this document.
5245 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
5246 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
5247 {
5248 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
5249 },
5250 ],
5251 &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.
5252 },
5253 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
5254 &quot;pages&quot;: [ # Visual page layout for the Document.
5255 { # A page in a Document.
5256 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
5257 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
5258 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5259 { # Detected language for a structural component.
5260 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5261 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5262 },
5263 ],
5264 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
5265 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5266 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5267 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5268 &quot;x&quot;: 3.14, # X coordinate.
5269 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5270 },
5271 ],
5272 &quot;vertices&quot;: [ # The bounding polygon vertices.
5273 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5274 &quot;x&quot;: 42, # X coordinate.
5275 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5276 },
5277 ],
5278 },
5279 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5280 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5281 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5282 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5283 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5284 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5285 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5286 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5287 },
5288 ],
5289 },
5290 },
5291 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
5292 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5293 &quot;parents&quot;: [ # References to the original elements that are replaced.
5294 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5295 &quot;id&quot;: 42, # The id of the parent provenance.
5296 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5297 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5298 },
5299 ],
5300 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5301 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5302 },
5303 },
5304 ],
5305 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
5306 { # A detected barcode.
5307 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
5308 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
5309 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
5310 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
5311 },
5312 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
5313 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5314 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5315 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5316 &quot;x&quot;: 3.14, # X coordinate.
5317 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5318 },
5319 ],
5320 &quot;vertices&quot;: [ # The bounding polygon vertices.
5321 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5322 &quot;x&quot;: 42, # X coordinate.
5323 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5324 },
5325 ],
5326 },
5327 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5328 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5329 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5330 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5331 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5332 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5333 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5334 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5335 },
5336 ],
5337 },
5338 },
5339 },
5340 ],
5341 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5342 { # Detected language for a structural component.
5343 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5344 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5345 },
5346 ],
5347 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
5348 &quot;height&quot;: 3.14, # Page height.
5349 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
5350 &quot;width&quot;: 3.14, # Page width.
5351 },
5352 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
5353 { # A form field detected on the page.
5354 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
5355 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
5356 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
5357 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5358 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5359 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5360 &quot;x&quot;: 3.14, # X coordinate.
5361 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5362 },
5363 ],
5364 &quot;vertices&quot;: [ # The bounding polygon vertices.
5365 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5366 &quot;x&quot;: 42, # X coordinate.
5367 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5368 },
5369 ],
5370 },
5371 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5372 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5373 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5374 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5375 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5376 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5377 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5378 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5379 },
5380 ],
5381 },
5382 },
5383 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
5384 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5385 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5386 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5387 &quot;x&quot;: 3.14, # X coordinate.
5388 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5389 },
5390 ],
5391 &quot;vertices&quot;: [ # The bounding polygon vertices.
5392 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5393 &quot;x&quot;: 42, # X coordinate.
5394 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5395 },
5396 ],
5397 },
5398 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5399 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5400 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5401 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5402 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5403 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5404 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5405 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5406 },
5407 ],
5408 },
5409 },
5410 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
5411 { # Detected language for a structural component.
5412 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5413 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5414 },
5415 ],
5416 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
5417 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5418 &quot;parents&quot;: [ # References to the original elements that are replaced.
5419 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5420 &quot;id&quot;: 42, # The id of the parent provenance.
5421 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5422 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5423 },
5424 ],
5425 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5426 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5427 },
5428 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
5429 { # Detected language for a structural component.
5430 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5431 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5432 },
5433 ],
5434 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
5435 },
5436 ],
5437 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
5438 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
5439 &quot;height&quot;: 42, # Height of the image in pixels.
5440 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
5441 &quot;width&quot;: 42, # Width of the image in pixels.
5442 },
5443 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
5444 &quot;detectedDefects&quot;: [ # A list of detected defects.
5445 { # Image Quality Defects
5446 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
5447 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
5448 },
5449 ],
5450 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
5451 },
5452 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
5453 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5454 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5455 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5456 &quot;x&quot;: 3.14, # X coordinate.
5457 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5458 },
5459 ],
5460 &quot;vertices&quot;: [ # The bounding polygon vertices.
5461 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5462 &quot;x&quot;: 42, # X coordinate.
5463 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5464 },
5465 ],
5466 },
5467 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5468 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5469 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5470 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5471 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5472 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5473 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5474 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5475 },
5476 ],
5477 },
5478 },
5479 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
5480 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
5481 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5482 { # Detected language for a structural component.
5483 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5484 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5485 },
5486 ],
5487 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
5488 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5489 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5490 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5491 &quot;x&quot;: 3.14, # X coordinate.
5492 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5493 },
5494 ],
5495 &quot;vertices&quot;: [ # The bounding polygon vertices.
5496 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5497 &quot;x&quot;: 42, # X coordinate.
5498 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5499 },
5500 ],
5501 },
5502 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5503 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5504 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5505 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5506 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5507 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5508 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5509 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5510 },
5511 ],
5512 },
5513 },
5514 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
5515 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5516 &quot;parents&quot;: [ # References to the original elements that are replaced.
5517 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5518 &quot;id&quot;: 42, # The id of the parent provenance.
5519 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5520 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5521 },
5522 ],
5523 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5524 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5525 },
5526 },
5527 ],
5528 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
5529 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
5530 { # A collection of lines that a human would perceive as a paragraph.
5531 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5532 { # Detected language for a structural component.
5533 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5534 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5535 },
5536 ],
5537 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
5538 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5539 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5540 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5541 &quot;x&quot;: 3.14, # X coordinate.
5542 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5543 },
5544 ],
5545 &quot;vertices&quot;: [ # The bounding polygon vertices.
5546 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5547 &quot;x&quot;: 42, # X coordinate.
5548 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5549 },
5550 ],
5551 },
5552 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5553 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5554 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5555 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5556 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5557 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5558 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5559 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5560 },
5561 ],
5562 },
5563 },
5564 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
5565 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5566 &quot;parents&quot;: [ # References to the original elements that are replaced.
5567 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5568 &quot;id&quot;: 42, # The id of the parent provenance.
5569 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5570 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5571 },
5572 ],
5573 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5574 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5575 },
5576 },
5577 ],
5578 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
5579 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5580 &quot;parents&quot;: [ # References to the original elements that are replaced.
5581 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5582 &quot;id&quot;: 42, # The id of the parent provenance.
5583 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5584 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5585 },
5586 ],
5587 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5588 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5589 },
5590 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
5591 { # A detected symbol.
5592 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5593 { # Detected language for a structural component.
5594 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5595 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5596 },
5597 ],
5598 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
5599 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5600 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5601 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5602 &quot;x&quot;: 3.14, # X coordinate.
5603 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5604 },
5605 ],
5606 &quot;vertices&quot;: [ # The bounding polygon vertices.
5607 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5608 &quot;x&quot;: 42, # X coordinate.
5609 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5610 },
5611 ],
5612 },
5613 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5614 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5615 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5616 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5617 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5618 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5619 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5620 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5621 },
5622 ],
5623 },
5624 },
5625 },
5626 ],
5627 &quot;tables&quot;: [ # A list of visually detected tables on the page.
5628 { # A table representation similar to HTML table structure.
5629 &quot;bodyRows&quot;: [ # Body rows of the table.
5630 { # A row of table cells.
5631 &quot;cells&quot;: [ # Cells that make up this row.
5632 { # A cell representation inside the table.
5633 &quot;colSpan&quot;: 42, # How many columns this cell spans.
5634 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5635 { # Detected language for a structural component.
5636 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5637 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5638 },
5639 ],
5640 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
5641 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5642 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5643 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5644 &quot;x&quot;: 3.14, # X coordinate.
5645 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5646 },
5647 ],
5648 &quot;vertices&quot;: [ # The bounding polygon vertices.
5649 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5650 &quot;x&quot;: 42, # X coordinate.
5651 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5652 },
5653 ],
5654 },
5655 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5656 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5657 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5658 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5659 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5660 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5661 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5662 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5663 },
5664 ],
5665 },
5666 },
5667 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
5668 },
5669 ],
5670 },
5671 ],
5672 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5673 { # Detected language for a structural component.
5674 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5675 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5676 },
5677 ],
5678 &quot;headerRows&quot;: [ # Header rows of the table.
5679 { # A row of table cells.
5680 &quot;cells&quot;: [ # Cells that make up this row.
5681 { # A cell representation inside the table.
5682 &quot;colSpan&quot;: 42, # How many columns this cell spans.
5683 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5684 { # Detected language for a structural component.
5685 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5686 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5687 },
5688 ],
5689 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
5690 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5691 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5692 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5693 &quot;x&quot;: 3.14, # X coordinate.
5694 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5695 },
5696 ],
5697 &quot;vertices&quot;: [ # The bounding polygon vertices.
5698 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5699 &quot;x&quot;: 42, # X coordinate.
5700 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5701 },
5702 ],
5703 },
5704 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5705 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5706 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5707 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5708 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5709 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5710 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5711 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5712 },
5713 ],
5714 },
5715 },
5716 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
5717 },
5718 ],
5719 },
5720 ],
5721 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
5722 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5723 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5724 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5725 &quot;x&quot;: 3.14, # X coordinate.
5726 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5727 },
5728 ],
5729 &quot;vertices&quot;: [ # The bounding polygon vertices.
5730 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5731 &quot;x&quot;: 42, # X coordinate.
5732 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5733 },
5734 ],
5735 },
5736 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5737 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5738 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5739 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5740 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5741 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5742 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5743 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5744 },
5745 ],
5746 },
5747 },
5748 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
5749 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5750 &quot;parents&quot;: [ # References to the original elements that are replaced.
5751 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5752 &quot;id&quot;: 42, # The id of the parent provenance.
5753 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5754 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5755 },
5756 ],
5757 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5758 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5759 },
5760 },
5761 ],
5762 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
5763 { # A detected token.
5764 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
5765 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
5766 },
5767 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5768 { # Detected language for a structural component.
5769 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5770 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5771 },
5772 ],
5773 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
5774 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5775 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5776 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5777 &quot;x&quot;: 3.14, # X coordinate.
5778 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5779 },
5780 ],
5781 &quot;vertices&quot;: [ # The bounding polygon vertices.
5782 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5783 &quot;x&quot;: 42, # X coordinate.
5784 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5785 },
5786 ],
5787 },
5788 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5789 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5790 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5791 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5792 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5793 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5794 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5795 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5796 },
5797 ],
5798 },
5799 },
5800 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
5801 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5802 &quot;parents&quot;: [ # References to the original elements that are replaced.
5803 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5804 &quot;id&quot;: 42, # The id of the parent provenance.
5805 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5806 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5807 },
5808 ],
5809 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5810 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5811 },
5812 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
5813 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
5814 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
5815 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5816 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
5817 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
5818 },
5819 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
5820 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
5821 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
5822 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
5823 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
5824 &quot;italic&quot;: True or False, # Whether the text is italic.
5825 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
5826 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
5827 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
5828 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
5829 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
5830 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
5831 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
5832 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
5833 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5834 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
5835 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
5836 },
5837 &quot;underlined&quot;: True or False, # Whether the text is underlined.
5838 },
5839 },
5840 ],
5841 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
5842 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
5843 &quot;cols&quot;: 42, # Number of columns in the matrix.
5844 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
5845 &quot;rows&quot;: 42, # Number of rows in the matrix.
5846 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
5847 },
5848 ],
5849 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
5850 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
5851 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
5852 { # Detected language for a structural component.
5853 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
5854 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
5855 },
5856 ],
5857 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
5858 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
5859 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
5860 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
5861 &quot;x&quot;: 3.14, # X coordinate.
5862 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
5863 },
5864 ],
5865 &quot;vertices&quot;: [ # The bounding polygon vertices.
5866 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
5867 &quot;x&quot;: 42, # X coordinate.
5868 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
5869 },
5870 ],
5871 },
5872 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
5873 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
5874 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5875 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5876 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5877 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5878 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5879 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5880 },
5881 ],
5882 },
5883 },
5884 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
5885 },
5886 ],
5887 },
5888 ],
5889 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
5890 { # Contains past or forward revisions of this document.
5891 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
5892 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
5893 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
5894 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
5895 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
5896 },
5897 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
5898 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
5899 42,
5900 ],
5901 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
5902 &quot;A String&quot;,
5903 ],
5904 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
5905 },
5906 ],
5907 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
5908 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
5909 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
5910 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
5911 },
5912 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
5913 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
5914 { # This message is used for text changes aka. OCR corrections.
5915 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
5916 &quot;provenance&quot;: [ # The history of this annotation.
5917 { # Structure to identify provenance relationships between annotations in different revisions.
5918 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
5919 &quot;parents&quot;: [ # References to the original elements that are replaced.
5920 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
5921 &quot;id&quot;: 42, # The id of the parent provenance.
5922 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
5923 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
5924 },
5925 ],
5926 &quot;revision&quot;: 42, # The index of the revision that produced this element.
5927 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
5928 },
5929 ],
5930 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
5931 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5932 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5933 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5934 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5935 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5936 },
5937 ],
5938 },
5939 },
5940 ],
5941 &quot;textStyles&quot;: [ # Styles for the Document.text.
5942 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
5943 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
5944 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
5945 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5946 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
5947 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
5948 },
5949 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
5950 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
5951 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
5952 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
5953 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
5954 },
5955 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
5956 &quot;fontSize&quot;: { # Font size with unit. # Font size.
5957 &quot;size&quot;: 3.14, # Font size for the text.
5958 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
5959 },
5960 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
5961 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
5962 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
5963 &quot;textSegments&quot;: [ # The text segments from the Document.text.
5964 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
5965 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
5966 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
5967 },
5968 ],
5969 },
5970 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
5971 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
5972 },
5973 ],
5974 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
5975 },
5976 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
5977 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
5978 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
5979 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
5980 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
5981 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
5982 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
5983 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
5984 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
5985 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
5986 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
5987 &quot;properties&quot;: [ # List of values that are user supplied metadata.
5988 { # Property of a document.
5989 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
5990 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
5991 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
5992 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
5993 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
5994 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
5995 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
5996 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
5997 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
5998 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
5999 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
6000 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
6001 },
6002 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
6003 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
6004 },
6005 ],
6006 },
6007 &quot;enumValues&quot;: { # Enum values. # Enum property values.
6008 &quot;values&quot;: [ # List of enum values.
6009 &quot;A String&quot;,
6010 ],
6011 },
6012 &quot;floatValues&quot;: { # Float values. # Float property values.
6013 &quot;values&quot;: [ # List of float values.
6014 3.14,
6015 ],
6016 },
6017 &quot;integerValues&quot;: { # Integer values. # Integer property values.
6018 &quot;values&quot;: [ # List of integer values.
6019 42,
6020 ],
6021 },
6022 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
6023 &quot;fields&quot;: { # Unordered map of dynamically typed values.
6024 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
6025 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
6026 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
6027 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
6028 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
6029 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
6030 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
6031 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
6032 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
6033 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
6034 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
6035 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
6036 },
6037 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
6038 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
6039 },
6040 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
6041 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
6042 },
6043 &quot;floatValue&quot;: 3.14, # Represents a float value.
6044 &quot;intValue&quot;: 42, # Represents a integer value.
6045 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
6046 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
6047 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
6048 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
6049 },
6050 },
6051 },
6052 },
6053 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
6054 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
6055 &quot;properties&quot;: [ # List of property values.
6056 # Object with schema name: GoogleCloudContentwarehouseV1Property
6057 ],
6058 },
6059 &quot;textValues&quot;: { # String/text values. # String/text property values.
6060 &quot;values&quot;: [ # List of text values.
6061 &quot;A String&quot;,
6062 ],
6063 },
6064 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
6065 &quot;values&quot;: [ # List of timestamp values.
6066 { # Timestamp value type.
6067 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
6068 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
6069 },
6070 ],
6071 },
6072 },
6073 ],
6074 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
6075 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
6076 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
6077 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
6078 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
6079 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
6080 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
6081 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
6082 },
6083 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control for the service.
6084 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
6085 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
6086 &quot;A String&quot;,
6087 ],
6088 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
6089 },
6090 },
6091 &quot;updateOptions&quot;: { # Options for Update operations. # Options for the update operation.
6092 &quot;mergeFieldsOptions&quot;: { # Options for merging updated fields. # Options for merging.
6093 &quot;replaceMessageFields&quot;: True or False, # When merging message fields, the default behavior is to merge the content of two message fields together. If you instead want to use the field from the source message to replace the corresponding field in the destination message, set this flag to true. When this flag is set, specified submessage fields that are missing in source will be cleared in destination.
6094 &quot;replaceRepeatedFields&quot;: True or False, # When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field. If you instead want to keep only the entries from the source repeated field, set this flag to true. If you want to replace a repeated field within a message field on the destination message, you must set both replace_repeated_fields and replace_message_fields to true, otherwise the repeated fields will be appended.
6095 },
6096 &quot;updateMask&quot;: &quot;A String&quot;, # Field mask for merging Document fields. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
6097 &quot;updateType&quot;: &quot;A String&quot;, # Type for update.
6098 },
6099 }
6100
6101 x__xgafv: string, V1 error format.
6102 Allowed values
6103 1 - v1 error format
6104 2 - v2 error format
6105
6106 Returns:
6107 An object of the form:
6108
6109 { # Response message for DocumentService.UpdateDocument.
6110 &quot;document&quot;: { # Defines the structure for content warehouse document proto. # Updated document after executing update request.
6111 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
6112 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
6113 &quot;chunks&quot;: [ # List of chunks.
6114 { # Represents a chunk.
6115 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
6116 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
6117 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
6118 { # Represents the page footer associated with the chunk.
6119 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
6120 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
6121 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
6122 },
6123 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
6124 },
6125 ],
6126 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
6127 { # Represents the page header associated with the chunk.
6128 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
6129 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
6130 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
6131 },
6132 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
6133 },
6134 ],
6135 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
6136 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
6137 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
6138 },
6139 &quot;sourceBlockIds&quot;: [ # Unused.
6140 &quot;A String&quot;,
6141 ],
6142 },
6143 ],
6144 },
6145 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
6146 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
6147 &quot;blocks&quot;: [ # List of blocks in the document.
6148 { # Represents a block. A block could be one of the various types (text, table, list) supported.
6149 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
6150 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
6151 &quot;listEntries&quot;: [ # List entries that constitute a list block.
6152 { # Represents an entry in the list.
6153 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
6154 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
6155 ],
6156 },
6157 ],
6158 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
6159 },
6160 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
6161 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
6162 &quot;pageStart&quot;: 42, # Page where block starts in the document.
6163 },
6164 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
6165 &quot;bodyRows&quot;: [ # Body rows containing main table content.
6166 { # Represents a row in a table.
6167 &quot;cells&quot;: [ # A table row is a list of table cells.
6168 { # Represents a cell in a table row.
6169 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
6170 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
6171 ],
6172 &quot;colSpan&quot;: 42, # How many columns this cell spans.
6173 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
6174 },
6175 ],
6176 },
6177 ],
6178 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
6179 &quot;headerRows&quot;: [ # Header rows at the top of the table.
6180 { # Represents a row in a table.
6181 &quot;cells&quot;: [ # A table row is a list of table cells.
6182 { # Represents a cell in a table row.
6183 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
6184 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
6185 ],
6186 &quot;colSpan&quot;: 42, # How many columns this cell spans.
6187 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
6188 },
6189 ],
6190 },
6191 ],
6192 },
6193 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
6194 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
6195 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
6196 ],
6197 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
6198 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
6199 },
6200 },
6201 ],
6202 },
6203 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
6204 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
6205 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
6206 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
6207 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
6208 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
6209 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
6210 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
6211 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
6212 &quot;A String&quot;,
6213 ],
6214 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
6215 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
6216 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
6217 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
6218 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
6219 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
6220 &quot;A String&quot;,
6221 ],
6222 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
6223 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
6224 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
6225 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
6226 },
6227 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
6228 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
6229 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
6230 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
6231 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
6232 },
6233 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
6234 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
6235 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
6236 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
6237 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
6238 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
6239 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
6240 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
6241 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
6242 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
6243 },
6244 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
6245 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
6246 },
6247 &quot;floatValue&quot;: 3.14, # Float value.
6248 &quot;integerValue&quot;: 42, # Integer value.
6249 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
6250 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
6251 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
6252 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
6253 },
6254 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
6255 },
6256 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
6257 &quot;pageRefs&quot;: [ # One or more references to visual page elements
6258 { # Represents a weak reference to a page element within a document.
6259 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
6260 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6261 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6262 &quot;x&quot;: 3.14, # X coordinate.
6263 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6264 },
6265 ],
6266 &quot;vertices&quot;: [ # The bounding polygon vertices.
6267 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6268 &quot;x&quot;: 42, # X coordinate.
6269 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6270 },
6271 ],
6272 },
6273 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
6274 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
6275 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
6276 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
6277 },
6278 ],
6279 },
6280 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
6281 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
6282 ],
6283 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
6284 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6285 &quot;parents&quot;: [ # References to the original elements that are replaced.
6286 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6287 &quot;id&quot;: 42, # The id of the parent provenance.
6288 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6289 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6290 },
6291 ],
6292 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6293 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6294 },
6295 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
6296 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
6297 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6298 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6299 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6300 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6301 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6302 },
6303 ],
6304 },
6305 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
6306 },
6307 ],
6308 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
6309 { # Relationship between Entities.
6310 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
6311 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
6312 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
6313 },
6314 ],
6315 &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). # Any error that occurred while processing this document.
6316 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
6317 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
6318 {
6319 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
6320 },
6321 ],
6322 &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.
6323 },
6324 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
6325 &quot;pages&quot;: [ # Visual page layout for the Document.
6326 { # A page in a Document.
6327 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
6328 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
6329 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6330 { # Detected language for a structural component.
6331 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6332 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6333 },
6334 ],
6335 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
6336 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6337 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6338 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6339 &quot;x&quot;: 3.14, # X coordinate.
6340 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6341 },
6342 ],
6343 &quot;vertices&quot;: [ # The bounding polygon vertices.
6344 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6345 &quot;x&quot;: 42, # X coordinate.
6346 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6347 },
6348 ],
6349 },
6350 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6351 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6352 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6353 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6354 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6355 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6356 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6357 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6358 },
6359 ],
6360 },
6361 },
6362 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
6363 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6364 &quot;parents&quot;: [ # References to the original elements that are replaced.
6365 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6366 &quot;id&quot;: 42, # The id of the parent provenance.
6367 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6368 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6369 },
6370 ],
6371 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6372 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6373 },
6374 },
6375 ],
6376 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
6377 { # A detected barcode.
6378 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
6379 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
6380 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
6381 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
6382 },
6383 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
6384 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6385 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6386 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6387 &quot;x&quot;: 3.14, # X coordinate.
6388 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6389 },
6390 ],
6391 &quot;vertices&quot;: [ # The bounding polygon vertices.
6392 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6393 &quot;x&quot;: 42, # X coordinate.
6394 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6395 },
6396 ],
6397 },
6398 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6399 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6400 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6401 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6402 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6403 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6404 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6405 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6406 },
6407 ],
6408 },
6409 },
6410 },
6411 ],
6412 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6413 { # Detected language for a structural component.
6414 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6415 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6416 },
6417 ],
6418 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
6419 &quot;height&quot;: 3.14, # Page height.
6420 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
6421 &quot;width&quot;: 3.14, # Page width.
6422 },
6423 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
6424 { # A form field detected on the page.
6425 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
6426 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
6427 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
6428 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6429 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6430 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6431 &quot;x&quot;: 3.14, # X coordinate.
6432 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6433 },
6434 ],
6435 &quot;vertices&quot;: [ # The bounding polygon vertices.
6436 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6437 &quot;x&quot;: 42, # X coordinate.
6438 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6439 },
6440 ],
6441 },
6442 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6443 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6444 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6445 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6446 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6447 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6448 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6449 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6450 },
6451 ],
6452 },
6453 },
6454 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
6455 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6456 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6457 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6458 &quot;x&quot;: 3.14, # X coordinate.
6459 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6460 },
6461 ],
6462 &quot;vertices&quot;: [ # The bounding polygon vertices.
6463 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6464 &quot;x&quot;: 42, # X coordinate.
6465 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6466 },
6467 ],
6468 },
6469 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6470 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6471 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6472 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6473 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6474 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6475 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6476 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6477 },
6478 ],
6479 },
6480 },
6481 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
6482 { # Detected language for a structural component.
6483 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6484 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6485 },
6486 ],
6487 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
6488 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6489 &quot;parents&quot;: [ # References to the original elements that are replaced.
6490 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6491 &quot;id&quot;: 42, # The id of the parent provenance.
6492 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6493 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6494 },
6495 ],
6496 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6497 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6498 },
6499 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
6500 { # Detected language for a structural component.
6501 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6502 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6503 },
6504 ],
6505 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
6506 },
6507 ],
6508 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
6509 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
6510 &quot;height&quot;: 42, # Height of the image in pixels.
6511 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
6512 &quot;width&quot;: 42, # Width of the image in pixels.
6513 },
6514 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
6515 &quot;detectedDefects&quot;: [ # A list of detected defects.
6516 { # Image Quality Defects
6517 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
6518 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
6519 },
6520 ],
6521 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
6522 },
6523 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
6524 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6525 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6526 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6527 &quot;x&quot;: 3.14, # X coordinate.
6528 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6529 },
6530 ],
6531 &quot;vertices&quot;: [ # The bounding polygon vertices.
6532 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6533 &quot;x&quot;: 42, # X coordinate.
6534 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6535 },
6536 ],
6537 },
6538 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6539 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6540 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6541 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6542 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6543 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6544 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6545 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6546 },
6547 ],
6548 },
6549 },
6550 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
6551 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
6552 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6553 { # Detected language for a structural component.
6554 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6555 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6556 },
6557 ],
6558 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
6559 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6560 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6561 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6562 &quot;x&quot;: 3.14, # X coordinate.
6563 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6564 },
6565 ],
6566 &quot;vertices&quot;: [ # The bounding polygon vertices.
6567 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6568 &quot;x&quot;: 42, # X coordinate.
6569 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6570 },
6571 ],
6572 },
6573 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6574 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6575 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6576 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6577 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6578 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6579 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6580 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6581 },
6582 ],
6583 },
6584 },
6585 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
6586 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6587 &quot;parents&quot;: [ # References to the original elements that are replaced.
6588 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6589 &quot;id&quot;: 42, # The id of the parent provenance.
6590 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6591 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6592 },
6593 ],
6594 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6595 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6596 },
6597 },
6598 ],
6599 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
6600 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
6601 { # A collection of lines that a human would perceive as a paragraph.
6602 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6603 { # Detected language for a structural component.
6604 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6605 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6606 },
6607 ],
6608 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
6609 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6610 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6611 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6612 &quot;x&quot;: 3.14, # X coordinate.
6613 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6614 },
6615 ],
6616 &quot;vertices&quot;: [ # The bounding polygon vertices.
6617 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6618 &quot;x&quot;: 42, # X coordinate.
6619 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6620 },
6621 ],
6622 },
6623 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6624 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6625 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6626 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6627 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6628 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6629 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6630 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6631 },
6632 ],
6633 },
6634 },
6635 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
6636 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6637 &quot;parents&quot;: [ # References to the original elements that are replaced.
6638 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6639 &quot;id&quot;: 42, # The id of the parent provenance.
6640 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6641 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6642 },
6643 ],
6644 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6645 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6646 },
6647 },
6648 ],
6649 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
6650 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6651 &quot;parents&quot;: [ # References to the original elements that are replaced.
6652 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6653 &quot;id&quot;: 42, # The id of the parent provenance.
6654 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6655 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6656 },
6657 ],
6658 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6659 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6660 },
6661 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
6662 { # A detected symbol.
6663 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6664 { # Detected language for a structural component.
6665 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6666 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6667 },
6668 ],
6669 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
6670 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6671 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6672 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6673 &quot;x&quot;: 3.14, # X coordinate.
6674 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6675 },
6676 ],
6677 &quot;vertices&quot;: [ # The bounding polygon vertices.
6678 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6679 &quot;x&quot;: 42, # X coordinate.
6680 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6681 },
6682 ],
6683 },
6684 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6685 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6686 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6687 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6688 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6689 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6690 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6691 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6692 },
6693 ],
6694 },
6695 },
6696 },
6697 ],
6698 &quot;tables&quot;: [ # A list of visually detected tables on the page.
6699 { # A table representation similar to HTML table structure.
6700 &quot;bodyRows&quot;: [ # Body rows of the table.
6701 { # A row of table cells.
6702 &quot;cells&quot;: [ # Cells that make up this row.
6703 { # A cell representation inside the table.
6704 &quot;colSpan&quot;: 42, # How many columns this cell spans.
6705 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6706 { # Detected language for a structural component.
6707 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6708 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6709 },
6710 ],
6711 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
6712 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6713 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6714 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6715 &quot;x&quot;: 3.14, # X coordinate.
6716 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6717 },
6718 ],
6719 &quot;vertices&quot;: [ # The bounding polygon vertices.
6720 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6721 &quot;x&quot;: 42, # X coordinate.
6722 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6723 },
6724 ],
6725 },
6726 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6727 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6728 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6729 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6730 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6731 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6732 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6733 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6734 },
6735 ],
6736 },
6737 },
6738 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
6739 },
6740 ],
6741 },
6742 ],
6743 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6744 { # Detected language for a structural component.
6745 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6746 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6747 },
6748 ],
6749 &quot;headerRows&quot;: [ # Header rows of the table.
6750 { # A row of table cells.
6751 &quot;cells&quot;: [ # Cells that make up this row.
6752 { # A cell representation inside the table.
6753 &quot;colSpan&quot;: 42, # How many columns this cell spans.
6754 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6755 { # Detected language for a structural component.
6756 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6757 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6758 },
6759 ],
6760 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
6761 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6762 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6763 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6764 &quot;x&quot;: 3.14, # X coordinate.
6765 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6766 },
6767 ],
6768 &quot;vertices&quot;: [ # The bounding polygon vertices.
6769 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6770 &quot;x&quot;: 42, # X coordinate.
6771 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6772 },
6773 ],
6774 },
6775 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6776 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6777 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6778 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6779 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6780 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6781 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6782 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6783 },
6784 ],
6785 },
6786 },
6787 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
6788 },
6789 ],
6790 },
6791 ],
6792 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
6793 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6794 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6795 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6796 &quot;x&quot;: 3.14, # X coordinate.
6797 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6798 },
6799 ],
6800 &quot;vertices&quot;: [ # The bounding polygon vertices.
6801 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6802 &quot;x&quot;: 42, # X coordinate.
6803 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6804 },
6805 ],
6806 },
6807 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6808 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6809 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6810 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6811 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6812 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6813 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6814 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6815 },
6816 ],
6817 },
6818 },
6819 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
6820 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6821 &quot;parents&quot;: [ # References to the original elements that are replaced.
6822 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6823 &quot;id&quot;: 42, # The id of the parent provenance.
6824 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6825 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6826 },
6827 ],
6828 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6829 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6830 },
6831 },
6832 ],
6833 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
6834 { # A detected token.
6835 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
6836 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
6837 },
6838 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6839 { # Detected language for a structural component.
6840 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6841 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6842 },
6843 ],
6844 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
6845 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6846 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6847 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6848 &quot;x&quot;: 3.14, # X coordinate.
6849 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6850 },
6851 ],
6852 &quot;vertices&quot;: [ # The bounding polygon vertices.
6853 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6854 &quot;x&quot;: 42, # X coordinate.
6855 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6856 },
6857 ],
6858 },
6859 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6860 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6861 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6862 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6863 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6864 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6865 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6866 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6867 },
6868 ],
6869 },
6870 },
6871 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
6872 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6873 &quot;parents&quot;: [ # References to the original elements that are replaced.
6874 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6875 &quot;id&quot;: 42, # The id of the parent provenance.
6876 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6877 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6878 },
6879 ],
6880 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6881 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6882 },
6883 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
6884 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
6885 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
6886 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6887 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
6888 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
6889 },
6890 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
6891 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
6892 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
6893 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
6894 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
6895 &quot;italic&quot;: True or False, # Whether the text is italic.
6896 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
6897 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
6898 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
6899 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
6900 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
6901 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
6902 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
6903 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
6904 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
6905 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
6906 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
6907 },
6908 &quot;underlined&quot;: True or False, # Whether the text is underlined.
6909 },
6910 },
6911 ],
6912 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
6913 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
6914 &quot;cols&quot;: 42, # Number of columns in the matrix.
6915 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
6916 &quot;rows&quot;: 42, # Number of rows in the matrix.
6917 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
6918 },
6919 ],
6920 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
6921 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
6922 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
6923 { # Detected language for a structural component.
6924 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
6925 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
6926 },
6927 ],
6928 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
6929 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
6930 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
6931 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
6932 &quot;x&quot;: 3.14, # X coordinate.
6933 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
6934 },
6935 ],
6936 &quot;vertices&quot;: [ # The bounding polygon vertices.
6937 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
6938 &quot;x&quot;: 42, # X coordinate.
6939 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
6940 },
6941 ],
6942 },
6943 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
6944 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
6945 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
6946 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
6947 &quot;textSegments&quot;: [ # The text segments from the Document.text.
6948 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
6949 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
6950 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
6951 },
6952 ],
6953 },
6954 },
6955 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
6956 },
6957 ],
6958 },
6959 ],
6960 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
6961 { # Contains past or forward revisions of this document.
6962 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
6963 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
6964 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
6965 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
6966 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
6967 },
6968 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
6969 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
6970 42,
6971 ],
6972 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
6973 &quot;A String&quot;,
6974 ],
6975 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
6976 },
6977 ],
6978 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
6979 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
6980 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
6981 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
6982 },
6983 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
6984 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
6985 { # This message is used for text changes aka. OCR corrections.
6986 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
6987 &quot;provenance&quot;: [ # The history of this annotation.
6988 { # Structure to identify provenance relationships between annotations in different revisions.
6989 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
6990 &quot;parents&quot;: [ # References to the original elements that are replaced.
6991 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
6992 &quot;id&quot;: 42, # The id of the parent provenance.
6993 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
6994 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
6995 },
6996 ],
6997 &quot;revision&quot;: 42, # The index of the revision that produced this element.
6998 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
6999 },
7000 ],
7001 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
7002 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7003 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7004 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7005 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7006 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7007 },
7008 ],
7009 },
7010 },
7011 ],
7012 &quot;textStyles&quot;: [ # Styles for the Document.text.
7013 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
7014 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
7015 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
7016 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7017 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
7018 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
7019 },
7020 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
7021 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
7022 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
7023 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
7024 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
7025 },
7026 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
7027 &quot;fontSize&quot;: { # Font size with unit. # Font size.
7028 &quot;size&quot;: 3.14, # Font size for the text.
7029 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
7030 },
7031 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
7032 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
7033 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7034 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7035 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7036 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7037 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7038 },
7039 ],
7040 },
7041 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
7042 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
7043 },
7044 ],
7045 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
7046 },
7047 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
7048 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
7049 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
7050 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
7051 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
7052 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
7053 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
7054 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
7055 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
7056 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
7057 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
7058 &quot;properties&quot;: [ # List of values that are user supplied metadata.
7059 { # Property of a document.
7060 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
7061 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
7062 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
7063 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
7064 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
7065 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
7066 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
7067 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
7068 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
7069 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
7070 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
7071 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
7072 },
7073 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
7074 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
7075 },
7076 ],
7077 },
7078 &quot;enumValues&quot;: { # Enum values. # Enum property values.
7079 &quot;values&quot;: [ # List of enum values.
7080 &quot;A String&quot;,
7081 ],
7082 },
7083 &quot;floatValues&quot;: { # Float values. # Float property values.
7084 &quot;values&quot;: [ # List of float values.
7085 3.14,
7086 ],
7087 },
7088 &quot;integerValues&quot;: { # Integer values. # Integer property values.
7089 &quot;values&quot;: [ # List of integer values.
7090 42,
7091 ],
7092 },
7093 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
7094 &quot;fields&quot;: { # Unordered map of dynamically typed values.
7095 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
7096 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
7097 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
7098 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
7099 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
7100 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
7101 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
7102 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
7103 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
7104 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
7105 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
7106 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
7107 },
7108 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
7109 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
7110 },
7111 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
7112 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
7113 },
7114 &quot;floatValue&quot;: 3.14, # Represents a float value.
7115 &quot;intValue&quot;: 42, # Represents a integer value.
7116 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
7117 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
7118 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
7119 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
7120 },
7121 },
7122 },
7123 },
7124 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
7125 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
7126 &quot;properties&quot;: [ # List of property values.
7127 # Object with schema name: GoogleCloudContentwarehouseV1Property
7128 ],
7129 },
7130 &quot;textValues&quot;: { # String/text values. # String/text property values.
7131 &quot;values&quot;: [ # List of text values.
7132 &quot;A String&quot;,
7133 ],
7134 },
7135 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
7136 &quot;values&quot;: [ # List of timestamp values.
7137 { # Timestamp value type.
7138 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
7139 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
7140 },
7141 ],
7142 },
7143 },
7144 ],
7145 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
7146 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
7147 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
7148 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
7149 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
7150 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
7151 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
7152 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
7153 },
7154 &quot;metadata&quot;: { # Additional information returned to client, such as debugging information. # Additional information for the API invocation, such as the request tracking id.
7155 &quot;requestId&quot;: &quot;A String&quot;, # A unique id associated with this call. This id is logged for tracking purpose.
7156 },
7157 &quot;ruleEngineOutput&quot;: { # Records the output of Rule Engine including rule evaluation and actions result. # Output from Rule Engine recording the rule evaluator and action executor&#x27;s output. Refer format in: google/cloud/contentwarehouse/v1/rule_engine.proto
7158 &quot;actionExecutorOutput&quot;: { # Represents the output of the Action Executor. # Output from Action Executor containing rule and corresponding actions execution result.
7159 &quot;ruleActionsPairs&quot;: [ # List of rule and corresponding actions result.
7160 { # Represents a rule and outputs of associated actions.
7161 &quot;actionOutputs&quot;: [ # Outputs of executing the actions associated with the above rule.
7162 { # Represents the result of executing an action.
7163 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action.
7164 &quot;actionState&quot;: &quot;A String&quot;, # State of an action.
7165 &quot;outputMessage&quot;: &quot;A String&quot;, # Action execution output message.
7166 },
7167 ],
7168 &quot;rule&quot;: { # Represents the rule for a content warehouse trigger. # Represents the rule.
7169 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
7170 { # Represents the action triggered by Rule Engine when the rule is true.
7171 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
7172 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
7173 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
7174 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
7175 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
7176 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
7177 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
7178 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
7179 &quot;A String&quot;,
7180 ],
7181 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
7182 },
7183 ],
7184 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
7185 },
7186 ],
7187 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
7188 { # Associates `members`, or principals, with a `role`.
7189 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7190 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
7191 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
7192 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
7193 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
7194 },
7195 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
7196 &quot;A String&quot;,
7197 ],
7198 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
7199 },
7200 ],
7201 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
7202 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7203 },
7204 },
7205 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
7206 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
7207 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7208 &quot;A String&quot;,
7209 ],
7210 },
7211 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
7212 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
7213 &quot;a_key&quot;: &quot;A String&quot;,
7214 },
7215 },
7216 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
7217 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
7218 &quot;a_key&quot;: &quot;A String&quot;,
7219 },
7220 },
7221 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
7222 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
7223 },
7224 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
7225 &quot;messages&quot;: [ # Messages to be published.
7226 &quot;A String&quot;,
7227 ],
7228 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
7229 },
7230 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
7231 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
7232 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7233 },
7234 },
7235 ],
7236 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
7237 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
7238 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
7239 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
7240 },
7241 },
7242 ],
7243 },
7244 &quot;documentName&quot;: &quot;A String&quot;, # Name of the document against which the rules and actions were evaluated.
7245 &quot;ruleEvaluatorOutput&quot;: { # Represents the output of the Rule Evaluator. # Output from Rule Evaluator containing matched, unmatched and invalid rules.
7246 &quot;invalidRules&quot;: [ # A subset of triggered rules that failed the validation check(s) after parsing.
7247 { # A triggered rule that failed the validation check(s) after parsing.
7248 &quot;error&quot;: &quot;A String&quot;, # Validation error on a parsed expression.
7249 &quot;rule&quot;: { # Represents the rule for a content warehouse trigger. # Triggered rule.
7250 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
7251 { # Represents the action triggered by Rule Engine when the rule is true.
7252 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
7253 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
7254 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
7255 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
7256 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
7257 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
7258 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
7259 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
7260 &quot;A String&quot;,
7261 ],
7262 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
7263 },
7264 ],
7265 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
7266 },
7267 ],
7268 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
7269 { # Associates `members`, or principals, with a `role`.
7270 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7271 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
7272 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
7273 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
7274 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
7275 },
7276 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
7277 &quot;A String&quot;,
7278 ],
7279 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
7280 },
7281 ],
7282 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
7283 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7284 },
7285 },
7286 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
7287 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
7288 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7289 &quot;A String&quot;,
7290 ],
7291 },
7292 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
7293 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
7294 &quot;a_key&quot;: &quot;A String&quot;,
7295 },
7296 },
7297 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
7298 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
7299 &quot;a_key&quot;: &quot;A String&quot;,
7300 },
7301 },
7302 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
7303 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
7304 },
7305 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
7306 &quot;messages&quot;: [ # Messages to be published.
7307 &quot;A String&quot;,
7308 ],
7309 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
7310 },
7311 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
7312 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
7313 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7314 },
7315 },
7316 ],
7317 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
7318 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
7319 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
7320 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
7321 },
7322 },
7323 ],
7324 &quot;matchedRules&quot;: [ # A subset of triggered rules that are evaluated true for a given request.
7325 { # Represents the rule for a content warehouse trigger.
7326 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
7327 { # Represents the action triggered by Rule Engine when the rule is true.
7328 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
7329 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
7330 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
7331 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
7332 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
7333 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
7334 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
7335 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
7336 &quot;A String&quot;,
7337 ],
7338 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
7339 },
7340 ],
7341 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
7342 },
7343 ],
7344 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
7345 { # Associates `members`, or principals, with a `role`.
7346 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7347 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
7348 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
7349 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
7350 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
7351 },
7352 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
7353 &quot;A String&quot;,
7354 ],
7355 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
7356 },
7357 ],
7358 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
7359 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7360 },
7361 },
7362 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
7363 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
7364 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7365 &quot;A String&quot;,
7366 ],
7367 },
7368 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
7369 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
7370 &quot;a_key&quot;: &quot;A String&quot;,
7371 },
7372 },
7373 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
7374 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
7375 &quot;a_key&quot;: &quot;A String&quot;,
7376 },
7377 },
7378 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
7379 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
7380 },
7381 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
7382 &quot;messages&quot;: [ # Messages to be published.
7383 &quot;A String&quot;,
7384 ],
7385 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
7386 },
7387 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
7388 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
7389 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7390 },
7391 },
7392 ],
7393 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
7394 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
7395 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
7396 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
7397 },
7398 ],
7399 &quot;triggeredRules&quot;: [ # List of rules fetched from database for the given request trigger type.
7400 { # Represents the rule for a content warehouse trigger.
7401 &quot;actions&quot;: [ # List of actions that are executed when the rule is satisfied.
7402 { # Represents the action triggered by Rule Engine when the rule is true.
7403 &quot;accessControl&quot;: { # Represents the action responsible for access control list management operations. # Action triggering access control operations.
7404 &quot;operationType&quot;: &quot;A String&quot;, # Identifies the type of operation.
7405 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Represents the new policy from which bindings are added, removed or replaced based on the type of the operation. the policy is limited to a few 10s of KB.
7406 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
7407 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
7408 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
7409 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
7410 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
7411 &quot;A String&quot;,
7412 ],
7413 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
7414 },
7415 ],
7416 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
7417 },
7418 ],
7419 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
7420 { # Associates `members`, or principals, with a `role`.
7421 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7422 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
7423 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
7424 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
7425 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
7426 },
7427 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
7428 &quot;A String&quot;,
7429 ],
7430 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
7431 },
7432 ],
7433 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
7434 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
7435 },
7436 },
7437 &quot;actionId&quot;: &quot;A String&quot;, # ID of the action. Managed internally.
7438 &quot;addToFolder&quot;: { # Represents the action responsible for adding document under a folder. # Action triggering create document link operation.
7439 &quot;folders&quot;: [ # Names of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7440 &quot;A String&quot;,
7441 ],
7442 },
7443 &quot;dataUpdate&quot;: { # Represents the action responsible for properties update operations. # Action triggering data update operations.
7444 &quot;entries&quot;: { # Map of (K, V) -&gt; (valid name of the field, new value of the field) E.g., (&quot;age&quot;, &quot;60&quot;) entry triggers update of field age with a value of 60. If the field is not present then new entry is added. During update action execution, value strings will be casted to appropriate types.
7445 &quot;a_key&quot;: &quot;A String&quot;,
7446 },
7447 },
7448 &quot;dataValidation&quot;: { # Represents the action responsible for data validation operations. # Action triggering data validation operations.
7449 &quot;conditions&quot;: { # Map of (K, V) -&gt; (field, string condition to be evaluated on the field) E.g., (&quot;age&quot;, &quot;age &gt; 18 &amp;&amp; age &lt; 60&quot;) entry triggers validation of field age with the given condition. Map entries will be ANDed during validation.
7450 &quot;a_key&quot;: &quot;A String&quot;,
7451 },
7452 },
7453 &quot;deleteDocumentAction&quot;: { # Represents the action responsible for deleting the document. # Action deleting the document.
7454 &quot;enableHardDelete&quot;: True or False, # Boolean field to select between hard vs soft delete options. Set &#x27;true&#x27; for &#x27;hard delete&#x27; and &#x27;false&#x27; for &#x27;soft delete&#x27;.
7455 },
7456 &quot;publishToPubSub&quot;: { # Represents the action responsible for publishing messages to a Pub/Sub topic. # Action publish to Pub/Sub operation.
7457 &quot;messages&quot;: [ # Messages to be published.
7458 &quot;A String&quot;,
7459 ],
7460 &quot;topicId&quot;: &quot;A String&quot;, # The topic id in the Pub/Sub service for which messages will be published to.
7461 },
7462 &quot;removeFromFolderAction&quot;: { # Represents the action responsible for remove a document from a specific folder. # Action removing a document from a folder.
7463 &quot;condition&quot;: &quot;A String&quot;, # Condition of the action to be executed.
7464 &quot;folder&quot;: &quot;A String&quot;, # Name of the folder under which new document is to be added. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7465 },
7466 },
7467 ],
7468 &quot;condition&quot;: &quot;A String&quot;, # Represents the conditional expression to be evaluated. Expression should evaluate to a boolean result. When the condition is true actions are executed. Example: user_role = &quot;hsbc_role_1&quot; AND doc.salary &gt; 20000
7469 &quot;description&quot;: &quot;A String&quot;, # Short description of the rule and its context.
7470 &quot;ruleId&quot;: &quot;A String&quot;, # ID of the rule. It has to be unique across all the examples. This is managed internally.
7471 &quot;triggerType&quot;: &quot;A String&quot;, # Identifies the trigger type for running the policy.
7472 },
7473 ],
7474 },
7475 },
7476 }</pre>
7477 </div>
7478
7479 <div class="method">
7480 <code class="details" id="search">search(parent, body=None, x__xgafv=None)</code>
7481 <pre>Searches for documents using provided SearchDocumentsRequest. This call only returns documents that the caller has permission to search against.
7482
7483 Args:
7484 parent: string, Required. The parent, which owns this collection of documents. Format: projects/{project_number}/locations/{location}. (required)
7485 body: object, The request body.
7486 The object takes the form of:
7487
7488 { # Request message for DocumentService.SearchDocuments.
7489 &quot;documentQuery&quot;: { # Query used to search against documents (keyword, filters, etc.).
7490 &quot;customPropertyFilter&quot;: &quot;A String&quot;, # This filter specifies a structured syntax to match against the [PropertyDefinition].is_filterable marked as `true`. The syntax for this expression is a subset of SQL syntax. Supported operators are: `=`, `!=`, `&lt;`, `&lt;=`, `&gt;`, and `&gt;=` where the left of the operator is a property name and the right of the operator is a number or a quoted string. You must escape backslash (\\) and quote (\&quot;) characters. Supported functions are `LOWER([property_name])` to perform a case insensitive match and `EMPTY([property_name])` to filter on the existence of a key. Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for example, &quot;((A AND B AND C) OR NOT D) AND E&quot;), a maximum of 100 comparisons or functions are allowed in the expression. The expression must be &lt; 6000 bytes in length. Sample Query: `(LOWER(driving_license)=&quot;class \&quot;a\&quot;&quot; OR EMPTY(driving_license)) AND driving_years &gt; 10`
7491 &quot;customWeightsMetadata&quot;: { # To support the custom weighting across document schemas. # To support the custom weighting across document schemas, customers need to provide the properties to be used to boost the ranking in the search request. For a search query with CustomWeightsMetadata specified, only the RetrievalImportance for the properties in the CustomWeightsMetadata will be honored.
7492 &quot;weightedSchemaProperties&quot;: [ # List of schema and property name. Allows a maximum of 10 schemas to be specified for relevance boosting.
7493 { # Specifies the schema property name.
7494 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The document schema name.
7495 &quot;propertyNames&quot;: [ # The property definition names in the schema.
7496 &quot;A String&quot;,
7497 ],
7498 },
7499 ],
7500 },
7501 &quot;documentCreatorFilter&quot;: [ # The exact creator(s) of the documents to search against. If a value isn&#x27;t specified, documents within the search results are associated with any creator. If multiple values are specified, documents within the search results may be associated with any of the specified creators.
7502 &quot;A String&quot;,
7503 ],
7504 &quot;documentNameFilter&quot;: [ # Search the documents in the list. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7505 &quot;A String&quot;,
7506 ],
7507 &quot;documentSchemaNames&quot;: [ # This filter specifies the exact document schema Document.document_schema_name of the documents to search against. If a value isn&#x27;t specified, documents within the search results are associated with any schema. If multiple values are specified, documents within the search results may be associated with any of the specified schemas. At most 20 document schema names are allowed.
7508 &quot;A String&quot;,
7509 ],
7510 &quot;fileTypeFilter&quot;: { # Filter for the specific types of documents returned. # This filter specifies the types of files to return: ALL, FOLDER, or FILE. If FOLDER or FILE is specified, then only either folders or files will be returned, respectively. If ALL is specified, both folders and files will be returned. If no value is specified, ALL files will be returned.
7511 &quot;fileType&quot;: &quot;A String&quot;, # The type of files to return.
7512 },
7513 &quot;folderNameFilter&quot;: &quot;A String&quot;, # Search all the documents under this specified folder. Format: projects/{project_number}/locations/{location}/documents/{document_id}.
7514 &quot;isNlQuery&quot;: True or False, # Experimental, do not use. If the query is a natural language question. False by default. If true, then the question-answering feature will be used instead of search, and `result_count` in SearchDocumentsRequest must be set. In addition, all other input fields related to search (pagination, histograms, etc.) will be ignored.
7515 &quot;propertyFilter&quot;: [ # This filter specifies a structured syntax to match against the PropertyDefinition.is_filterable marked as `true`. The relationship between the PropertyFilters is OR.
7516 {
7517 &quot;condition&quot;: &quot;A String&quot;, # The filter condition. The syntax for this expression is a subset of SQL syntax. Supported operators are: `=`, `!=`, `&lt;`, `&lt;=`, `&gt;`, `&gt;=`, and `~~` where the left of the operator is a property name and the right of the operator is a number or a quoted string. You must escape backslash (\\) and quote (\&quot;) characters. `~~` is the LIKE operator. The right of the operator must be a string. The only supported property data type for LIKE is text_values. It provides semantic search functionality by parsing, stemming and doing synonyms expansion against the input query. It matches if the property contains semantic similar content to the query. It is not regex matching or wildcard matching. For example, &quot;property.company ~~ \&quot;google\&quot;&quot; will match records whose property `property.compnay` have values like &quot;Google Inc.&quot;, &quot;Google LLC&quot; or &quot;Google Company&quot;. Supported functions are `LOWER([property_name])` to perform a case insensitive match and `EMPTY([property_name])` to filter on the existence of a key. Boolean expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for example, &quot;((A AND B AND C) OR NOT D) AND E&quot;), a maximum of 100 comparisons or functions are allowed in the expression. The expression must be &lt; 6000 bytes in length. Only properties that are marked filterable are allowed (PropertyDefinition.is_filterable). Property names do not need to be prefixed by the document schema id (as is the case with histograms), however property names will need to be prefixed by its parent hierarchy, if any. For example: top_property_name.sub_property_name. Sample Query: `(LOWER(driving_license)=&quot;class \&quot;a\&quot;&quot; OR EMPTY(driving_license)) AND driving_years &gt; 10` CMEK compliant deployment only supports: * Operators: `=`, `&lt;`, `&lt;=`, `&gt;`, and `&gt;=`. * Boolean expressions: AND and OR.
7518 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name Document.document_schema_name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
7519 },
7520 ],
7521 &quot;query&quot;: &quot;A String&quot;, # The query string that matches against the full text of the document and the searchable properties. The query partially supports [Google AIP style syntax](https://google.aip.dev/160). Specifically, the query supports literals, logical operators, negation operators, comparison operators, and functions. Literals: A bare literal value (examples: &quot;42&quot;, &quot;Hugo&quot;) is a value to be matched against. It searches over the full text of the document and the searchable properties. Logical operators: &quot;AND&quot;, &quot;and&quot;, &quot;OR&quot;, and &quot;or&quot; are binary logical operators (example: &quot;engineer OR developer&quot;). Negation operators: &quot;NOT&quot; and &quot;!&quot; are negation operators (example: &quot;NOT software&quot;). Comparison operators: support the binary comparison operators =, !=, &lt;, &gt;, &lt;= and &gt;= for string, numeric, enum, boolean. Also support like operator `~~` for string. It provides semantic search functionality by parsing, stemming and doing synonyms expansion against the input query. To specify a property in the query, the left hand side expression in the comparison must be the property ID including the parent. The right hand side must be literals. For example: &quot;\&quot;projects/123/locations/us\&quot;.property_a &lt; 1&quot; matches results whose &quot;property_a&quot; is less than 1 in project 123 and us location. The literals and comparison expression can be connected in a single query (example: &quot;software engineer \&quot;projects/123/locations/us\&quot;.salary &gt; 100&quot;). Functions: supported functions are `LOWER([property_name])` to perform a case insensitive match and `EMPTY([property_name])` to filter on the existence of a key. Support nested expressions connected using parenthesis and logical operators. The default logical operators is `AND` if there is no operators between expressions. The query can be used with other filters e.g. `time_filters` and `folder_name_filter`. They are connected with `AND` operator under the hood. The maximum number of allowed characters is 255.
7522 &quot;queryContext&quot;: [ # For custom synonyms. Customers provide the synonyms based on context. One customer can provide multiple set of synonyms based on different context. The search query will be expanded based on the custom synonyms of the query context set. By default, no custom synonyms wll be applied if no query context is provided. It is not supported for CMEK compliant deployment.
7523 &quot;A String&quot;,
7524 ],
7525 &quot;timeFilters&quot;: [ # Documents created/updated within a range specified by this filter are searched against.
7526 { # Filter on create timestamp or update timestamp of documents.
7527 &quot;timeField&quot;: &quot;A String&quot;, # Specifies which time field to filter documents on. Defaults to TimeField.UPLOAD_TIME.
7528 &quot;timeRange&quot;: { # Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
7529 &quot;endTime&quot;: &quot;A String&quot;, # Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
7530 &quot;startTime&quot;: &quot;A String&quot;, # Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
7531 },
7532 },
7533 ],
7534 },
7535 &quot;histogramQueries&quot;: [ # An expression specifying a histogram request against matching documents. Expression syntax is an aggregation function call with histogram facets and other options. The following aggregation functions are supported: * `count(string_histogram_facet)`: Count the number of matching entities for each distinct attribute value. Data types: * Histogram facet (aka filterable properties): Facet names with format &lt;schema id&gt;.&lt;facet&gt;. Facets will have the format of: `a-zA-Z`. If the facet is a child facet, then the parent hierarchy needs to be specified separated by dots in the prefix after the schema id. Thus, the format for a multi- level facet is: &lt;schema id&gt;.&lt;parent facet name&gt;. &lt;child facet name&gt;. Example: schema123.root_parent_facet.middle_facet.child_facet * DocumentSchemaId: (with no schema id prefix) to get histograms for each document type (returns the schema id path, e.g. projects/12345/locations/us-west/documentSchemas/abc123). Example expression: * Document type counts: count(&#x27;DocumentSchemaId&#x27;) * For schema id, abc123, get the counts for MORTGAGE_TYPE: count(&#x27;abc123.MORTGAGE_TYPE&#x27;)
7536 { # The histogram request.
7537 &quot;filters&quot;: { # Optional. Filter the result of histogram query by the property names. It only works with histogram query count(&#x27;FilterableProperties&#x27;). It is an optional. It will perform histogram on all the property names for all the document schemas. Setting this field will have a better performance.
7538 &quot;documentSchemas&quot;: [ # This filter specifies the exact document schema(s) Document.document_schema_name to run histogram query against. It is optional. It will perform histogram for property names for all the document schemas if it is not set. At most 10 document schema names are allowed. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
7539 &quot;A String&quot;,
7540 ],
7541 &quot;propertyNames&quot;: [ # It is optional. It will perform histogram for all the property names if it is not set. The properties need to be defined with the is_filterable flag set to true and the name of the property should be in the format: &quot;schemaId.propertyName&quot;. The property needs to be defined in the schema. Example: the schema id is abc. Then the name of property for property MORTGAGE_TYPE will be &quot;abc.MORTGAGE_TYPE&quot;.
7542 &quot;A String&quot;,
7543 ],
7544 &quot;yAxis&quot;: &quot;A String&quot;, # By default, the y_axis is HISTOGRAM_YAXIS_DOCUMENT if this field is not set.
7545 },
7546 &quot;histogramQuery&quot;: &quot;A String&quot;, # An expression specifies a histogram request against matching documents for searches. See SearchDocumentsRequest.histogram_queries for details about syntax.
7547 &quot;requirePreciseResultSize&quot;: True or False, # Controls if the histogram query requires the return of a precise count. Enable this flag may adversely impact performance. Defaults to true.
7548 },
7549 ],
7550 &quot;offset&quot;: 42, # An integer that specifies the current offset (that is, starting result location, amongst the documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. The maximum allowed value is 5000. Otherwise an error is thrown. For example, 0 means to return results starting from the first matching document, and 10 means to return from the 11th document. This can be used for pagination, (for example, pageSize = 10 and offset = 10 means to return from the second page).
7551 &quot;orderBy&quot;: &quot;A String&quot;, # The criteria determining how search results are sorted. For non-empty query, default is `&quot;relevance desc&quot;`. For empty query, default is `&quot;upload_date desc&quot;`. Supported options are: * `&quot;relevance desc&quot;`: By relevance descending, as determined by the API algorithms. * `&quot;upload_date desc&quot;`: By upload date descending. * `&quot;upload_date&quot;`: By upload date ascending. * `&quot;update_date desc&quot;`: By last updated date descending. * `&quot;update_date&quot;`: By last updated date ascending. * `&quot;retrieval_importance desc&quot;`: By retrieval importance of properties descending. This feature is still under development, please do not use unless otherwise instructed to do so.
7552 &quot;pageSize&quot;: 42, # A limit on the number of documents returned in the search results. Increasing this value above the default value of 10 can increase search response time. The value can be between 1 and 100.
7553 &quot;pageToken&quot;: &quot;A String&quot;, # The token specifying the current offset within search results. See SearchDocumentsResponse.next_page_token for an explanation of how to obtain the next set of query results.
7554 &quot;qaSizeLimit&quot;: 42, # Experimental, do not use. The limit on the number of documents returned for the question-answering feature. To enable the question-answering feature, set [DocumentQuery].is_nl_query to true.
7555 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control and improve the search quality of the service.
7556 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
7557 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
7558 &quot;A String&quot;,
7559 ],
7560 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
7561 },
7562 },
7563 &quot;requireTotalSize&quot;: True or False, # Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size. Enabling this flag may adversely impact performance. Hint: If this is used with pagination, set this flag on the initial query but set this to false on subsequent page calls (keep the total count locally). Defaults to false.
7564 &quot;totalResultSize&quot;: &quot;A String&quot;, # Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size.
7565 }
7566
7567 x__xgafv: string, V1 error format.
7568 Allowed values
7569 1 - v1 error format
7570 2 - v2 error format
7571
7572 Returns:
7573 An object of the form:
7574
7575 { # Response message for DocumentService.SearchDocuments.
7576 &quot;histogramQueryResults&quot;: [ # The histogram results that match with the specified SearchDocumentsRequest.histogram_queries.
7577 { # Histogram result that matches HistogramQuery specified in searches.
7578 &quot;histogram&quot;: { # A map from the values of the facet associated with distinct values to the number of matching entries with corresponding value. The key format is: * (for string histogram) string values stored in the field.
7579 &quot;a_key&quot;: &quot;A String&quot;,
7580 },
7581 &quot;histogramQuery&quot;: &quot;A String&quot;, # Requested histogram expression.
7582 },
7583 ],
7584 &quot;matchingDocuments&quot;: [ # The document entities that match the specified SearchDocumentsRequest.
7585 { # Document entry with metadata inside SearchDocumentsResponse
7586 &quot;document&quot;: { # Defines the structure for content warehouse document proto. # Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.
7587 &quot;cloudAiDocument&quot;: { # Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. # Document AI format to save the structured content, including OCR.
7588 &quot;chunkedDocument&quot;: { # Represents the chunks that the document is divided into. # Document chunked based on chunking config.
7589 &quot;chunks&quot;: [ # List of chunks.
7590 { # Represents a chunk.
7591 &quot;chunkId&quot;: &quot;A String&quot;, # ID of the chunk.
7592 &quot;content&quot;: &quot;A String&quot;, # Text content of the chunk.
7593 &quot;pageFooters&quot;: [ # Page footers associated with the chunk.
7594 { # Represents the page footer associated with the chunk.
7595 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the footer.
7596 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
7597 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
7598 },
7599 &quot;text&quot;: &quot;A String&quot;, # Footer in text format.
7600 },
7601 ],
7602 &quot;pageHeaders&quot;: [ # Page headers associated with the chunk.
7603 { # Represents the page header associated with the chunk.
7604 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the header.
7605 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
7606 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
7607 },
7608 &quot;text&quot;: &quot;A String&quot;, # Header in text format.
7609 },
7610 ],
7611 &quot;pageSpan&quot;: { # Represents where the chunk starts and ends in the document. # Page span of the chunk.
7612 &quot;pageEnd&quot;: 42, # Page where chunk ends in the document.
7613 &quot;pageStart&quot;: 42, # Page where chunk starts in the document.
7614 },
7615 &quot;sourceBlockIds&quot;: [ # Unused.
7616 &quot;A String&quot;,
7617 ],
7618 },
7619 ],
7620 },
7621 &quot;content&quot;: &quot;A String&quot;, # Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.
7622 &quot;documentLayout&quot;: { # Represents the parsed layout of a document as a collection of blocks that the document is divided into. # Parsed layout of the document.
7623 &quot;blocks&quot;: [ # List of blocks in the document.
7624 { # Represents a block. A block could be one of the various types (text, table, list) supported.
7625 &quot;blockId&quot;: &quot;A String&quot;, # ID of the block.
7626 &quot;listBlock&quot;: { # Represents a list type block. # Block consisting of list content/structure.
7627 &quot;listEntries&quot;: [ # List entries that constitute a list block.
7628 { # Represents an entry in the list.
7629 &quot;blocks&quot;: [ # A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
7630 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
7631 ],
7632 },
7633 ],
7634 &quot;type&quot;: &quot;A String&quot;, # Type of the list_entries (if exist). Available options are `ordered` and `unordered`.
7635 },
7636 &quot;pageSpan&quot;: { # Represents where the block starts and ends in the document. # Page span of the block.
7637 &quot;pageEnd&quot;: 42, # Page where block ends in the document.
7638 &quot;pageStart&quot;: 42, # Page where block starts in the document.
7639 },
7640 &quot;tableBlock&quot;: { # Represents a table type block. # Block consisting of table content/structure.
7641 &quot;bodyRows&quot;: [ # Body rows containing main table content.
7642 { # Represents a row in a table.
7643 &quot;cells&quot;: [ # A table row is a list of table cells.
7644 { # Represents a cell in a table row.
7645 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
7646 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
7647 ],
7648 &quot;colSpan&quot;: 42, # How many columns this cell spans.
7649 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
7650 },
7651 ],
7652 },
7653 ],
7654 &quot;caption&quot;: &quot;A String&quot;, # Table caption/title.
7655 &quot;headerRows&quot;: [ # Header rows at the top of the table.
7656 { # Represents a row in a table.
7657 &quot;cells&quot;: [ # A table row is a list of table cells.
7658 { # Represents a cell in a table row.
7659 &quot;blocks&quot;: [ # A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.
7660 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
7661 ],
7662 &quot;colSpan&quot;: 42, # How many columns this cell spans.
7663 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
7664 },
7665 ],
7666 },
7667 ],
7668 },
7669 &quot;textBlock&quot;: { # Represents a text type block. # Block consisting of text content.
7670 &quot;blocks&quot;: [ # A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.
7671 # Object with schema name: GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock
7672 ],
7673 &quot;text&quot;: &quot;A String&quot;, # Text content stored in the block.
7674 &quot;type&quot;: &quot;A String&quot;, # Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.
7675 },
7676 },
7677 ],
7678 },
7679 &quot;entities&quot;: [ # A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.
7680 { # An entity that could be a phrase in the text or a property that belongs to the document. It is a known entity type, such as a person, an organization, or location.
7681 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
7682 &quot;id&quot;: &quot;A String&quot;, # Optional. Canonical id. This will be a unique value in the entity list for this document.
7683 &quot;mentionId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use `id` field instead.
7684 &quot;mentionText&quot;: &quot;A String&quot;, # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
7685 &quot;normalizedValue&quot;: { # Parsed and normalized entity value. # Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types.
7686 &quot;addressValue&quot;: { # Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478 # Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto
7687 &quot;addressLines&quot;: [ # Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example &quot;Austin, TX&quot;), it is important that the line order is clear. The order of address lines should be &quot;envelope order&quot; for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example &quot;ja&quot; for large-to-small ordering and &quot;ja-Latn&quot; or &quot;en&quot; for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
7688 &quot;A String&quot;,
7689 ],
7690 &quot;administrativeArea&quot;: &quot;A String&quot;, # Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example &quot;Barcelona&quot; and not &quot;Catalonia&quot;). Many countries don&#x27;t use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
7691 &quot;languageCode&quot;: &quot;A String&quot;, # Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address&#x27; country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: &quot;zh-Hant&quot;, &quot;ja&quot;, &quot;ja-Latn&quot;, &quot;en&quot;.
7692 &quot;locality&quot;: &quot;A String&quot;, # Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
7693 &quot;organization&quot;: &quot;A String&quot;, # Optional. The name of the organization at the address.
7694 &quot;postalCode&quot;: &quot;A String&quot;, # Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
7695 &quot;recipients&quot;: [ # Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain &quot;care of&quot; information.
7696 &quot;A String&quot;,
7697 ],
7698 &quot;regionCode&quot;: &quot;A String&quot;, # Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: &quot;CH&quot; for Switzerland.
7699 &quot;revision&quot;: 42, # The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
7700 &quot;sortingCode&quot;: &quot;A String&quot;, # Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like &quot;CEDEX&quot;, optionally followed by a number (For example &quot;CEDEX 7&quot;), or just a number alone, representing the &quot;sector code&quot; (Jamaica), &quot;delivery area indicator&quot; (Malawi) or &quot;post office indicator&quot; (For example Côte d&#x27;Ivoire).
7701 &quot;sublocality&quot;: &quot;A String&quot;, # Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
7702 },
7703 &quot;booleanValue&quot;: True or False, # Boolean value. Can be used for entities with binary values, or for checkboxes.
7704 &quot;dateValue&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto
7705 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
7706 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
7707 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
7708 },
7709 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto
7710 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
7711 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
7712 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
7713 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
7714 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
7715 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
7716 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
7717 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
7718 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
7719 },
7720 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
7721 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
7722 },
7723 &quot;floatValue&quot;: 3.14, # Float value.
7724 &quot;integerValue&quot;: 42, # Integer value.
7725 &quot;moneyValue&quot;: { # Represents an amount of money with its currency type. # Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto
7726 &quot;currencyCode&quot;: &quot;A String&quot;, # The three-letter currency code defined in ISO 4217.
7727 &quot;nanos&quot;: 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
7728 &quot;units&quot;: &quot;A String&quot;, # The whole units of the amount. For example if `currencyCode` is `&quot;USD&quot;`, then 1 unit is one US dollar.
7729 },
7730 &quot;text&quot;: &quot;A String&quot;, # Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.
7731 },
7732 &quot;pageAnchor&quot;: { # Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types. # Optional. Represents the provenance of this entity wrt. the location on the page where it was found.
7733 &quot;pageRefs&quot;: [ # One or more references to visual page elements
7734 { # Represents a weak reference to a page element within a document.
7735 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it&#x27;s referring to.
7736 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
7737 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
7738 &quot;x&quot;: 3.14, # X coordinate.
7739 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
7740 },
7741 ],
7742 &quot;vertices&quot;: [ # The bounding polygon vertices.
7743 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
7744 &quot;x&quot;: 42, # X coordinate.
7745 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
7746 },
7747 ],
7748 },
7749 &quot;confidence&quot;: 3.14, # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
7750 &quot;layoutId&quot;: &quot;A String&quot;, # Optional. Deprecated. Use PageRef.bounding_poly instead.
7751 &quot;layoutType&quot;: &quot;A String&quot;, # Optional. The type of the layout element that is being referenced if any.
7752 &quot;page&quot;: &quot;A String&quot;, # Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
7753 },
7754 ],
7755 },
7756 &quot;properties&quot;: [ # Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.
7757 # Object with schema name: GoogleCloudDocumentaiV1DocumentEntity
7758 ],
7759 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # Optional. The history of this annotation.
7760 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
7761 &quot;parents&quot;: [ # References to the original elements that are replaced.
7762 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
7763 &quot;id&quot;: 42, # The id of the parent provenance.
7764 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
7765 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
7766 },
7767 ],
7768 &quot;revision&quot;: 42, # The index of the revision that produced this element.
7769 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
7770 },
7771 &quot;redacted&quot;: True or False, # Optional. Whether the entity will be redacted for de-identification purposes.
7772 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Optional. Provenance of the entity. Text anchor indexing into the Document.text.
7773 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7774 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7775 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7776 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7777 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7778 },
7779 ],
7780 },
7781 &quot;type&quot;: &quot;A String&quot;, # Required. Entity type from a schema e.g. `Address`.
7782 },
7783 ],
7784 &quot;entityRelations&quot;: [ # Placeholder. Relationship among Document.entities.
7785 { # Relationship between Entities.
7786 &quot;objectId&quot;: &quot;A String&quot;, # Object entity id.
7787 &quot;relation&quot;: &quot;A String&quot;, # Relationship description.
7788 &quot;subjectId&quot;: &quot;A String&quot;, # Subject entity id.
7789 },
7790 ],
7791 &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). # Any error that occurred while processing this document.
7792 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
7793 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
7794 {
7795 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
7796 },
7797 ],
7798 &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.
7799 },
7800 &quot;mimeType&quot;: &quot;A String&quot;, # An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).
7801 &quot;pages&quot;: [ # Visual page layout for the Document.
7802 { # A page in a Document.
7803 &quot;blocks&quot;: [ # A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
7804 { # A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.
7805 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
7806 { # Detected language for a structural component.
7807 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
7808 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
7809 },
7810 ],
7811 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Block.
7812 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
7813 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
7814 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
7815 &quot;x&quot;: 3.14, # X coordinate.
7816 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
7817 },
7818 ],
7819 &quot;vertices&quot;: [ # The bounding polygon vertices.
7820 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
7821 &quot;x&quot;: 42, # X coordinate.
7822 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
7823 },
7824 ],
7825 },
7826 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
7827 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
7828 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
7829 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7830 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7831 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7832 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7833 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7834 },
7835 ],
7836 },
7837 },
7838 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
7839 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
7840 &quot;parents&quot;: [ # References to the original elements that are replaced.
7841 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
7842 &quot;id&quot;: 42, # The id of the parent provenance.
7843 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
7844 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
7845 },
7846 ],
7847 &quot;revision&quot;: 42, # The index of the revision that produced this element.
7848 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
7849 },
7850 },
7851 ],
7852 &quot;detectedBarcodes&quot;: [ # A list of detected barcodes.
7853 { # A detected barcode.
7854 &quot;barcode&quot;: { # Encodes the detailed information of a barcode. # Detailed barcode information of the DetectedBarcode.
7855 &quot;format&quot;: &quot;A String&quot;, # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
7856 &quot;rawValue&quot;: &quot;A String&quot;, # Raw value encoded in the barcode. For example: `&#x27;MEBKM:TITLE:Google;URL:https://www.google.com;;&#x27;`.
7857 &quot;valueFormat&quot;: &quot;A String&quot;, # Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver&#x27;s license.
7858 },
7859 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for DetectedBarcode.
7860 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
7861 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
7862 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
7863 &quot;x&quot;: 3.14, # X coordinate.
7864 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
7865 },
7866 ],
7867 &quot;vertices&quot;: [ # The bounding polygon vertices.
7868 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
7869 &quot;x&quot;: 42, # X coordinate.
7870 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
7871 },
7872 ],
7873 },
7874 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
7875 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
7876 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
7877 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7878 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7879 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7880 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7881 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7882 },
7883 ],
7884 },
7885 },
7886 },
7887 ],
7888 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
7889 { # Detected language for a structural component.
7890 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
7891 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
7892 },
7893 ],
7894 &quot;dimension&quot;: { # Dimension for the page. # Physical dimension of the page.
7895 &quot;height&quot;: 3.14, # Page height.
7896 &quot;unit&quot;: &quot;A String&quot;, # Dimension unit.
7897 &quot;width&quot;: 3.14, # Page width.
7898 },
7899 &quot;formFields&quot;: [ # A list of visually detected form fields on the page.
7900 { # A form field detected on the page.
7901 &quot;correctedKeyText&quot;: &quot;A String&quot;, # Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.
7902 &quot;correctedValueText&quot;: &quot;A String&quot;, # Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.
7903 &quot;fieldName&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc.
7904 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
7905 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
7906 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
7907 &quot;x&quot;: 3.14, # X coordinate.
7908 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
7909 },
7910 ],
7911 &quot;vertices&quot;: [ # The bounding polygon vertices.
7912 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
7913 &quot;x&quot;: 42, # X coordinate.
7914 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
7915 },
7916 ],
7917 },
7918 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
7919 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
7920 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
7921 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7922 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7923 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7924 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7925 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7926 },
7927 ],
7928 },
7929 },
7930 &quot;fieldValue&quot;: { # Visual element describing a layout unit on a page. # Layout for the FormField value.
7931 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
7932 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
7933 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
7934 &quot;x&quot;: 3.14, # X coordinate.
7935 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
7936 },
7937 ],
7938 &quot;vertices&quot;: [ # The bounding polygon vertices.
7939 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
7940 &quot;x&quot;: 42, # X coordinate.
7941 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
7942 },
7943 ],
7944 },
7945 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
7946 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
7947 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
7948 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
7949 &quot;textSegments&quot;: [ # The text segments from the Document.text.
7950 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
7951 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
7952 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
7953 },
7954 ],
7955 },
7956 },
7957 &quot;nameDetectedLanguages&quot;: [ # A list of detected languages for name together with confidence.
7958 { # Detected language for a structural component.
7959 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
7960 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
7961 },
7962 ],
7963 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
7964 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
7965 &quot;parents&quot;: [ # References to the original elements that are replaced.
7966 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
7967 &quot;id&quot;: 42, # The id of the parent provenance.
7968 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
7969 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
7970 },
7971 ],
7972 &quot;revision&quot;: 42, # The index of the revision that produced this element.
7973 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
7974 },
7975 &quot;valueDetectedLanguages&quot;: [ # A list of detected languages for value together with confidence.
7976 { # Detected language for a structural component.
7977 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
7978 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
7979 },
7980 ],
7981 &quot;valueType&quot;: &quot;A String&quot;, # If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`
7982 },
7983 ],
7984 &quot;image&quot;: { # Rendered image contents for this page. # Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned.
7985 &quot;content&quot;: &quot;A String&quot;, # Raw byte content of the image.
7986 &quot;height&quot;: 42, # Height of the image in pixels.
7987 &quot;mimeType&quot;: &quot;A String&quot;, # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.
7988 &quot;width&quot;: 42, # Width of the image in pixels.
7989 },
7990 &quot;imageQualityScores&quot;: { # Image quality scores for the page image. # Image quality scores.
7991 &quot;detectedDefects&quot;: [ # A list of detected defects.
7992 { # Image Quality Defects
7993 &quot;confidence&quot;: 3.14, # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence that the defect exists.
7994 &quot;type&quot;: &quot;A String&quot;, # Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
7995 },
7996 ],
7997 &quot;qualityScore&quot;: 3.14, # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
7998 },
7999 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for the page.
8000 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8001 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8002 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8003 &quot;x&quot;: 3.14, # X coordinate.
8004 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8005 },
8006 ],
8007 &quot;vertices&quot;: [ # The bounding polygon vertices.
8008 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8009 &quot;x&quot;: 42, # X coordinate.
8010 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8011 },
8012 ],
8013 },
8014 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8015 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8016 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8017 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8018 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8019 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8020 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8021 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8022 },
8023 ],
8024 },
8025 },
8026 &quot;lines&quot;: [ # A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.
8027 { # A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.
8028 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8029 { # Detected language for a structural component.
8030 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8031 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8032 },
8033 ],
8034 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Line.
8035 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8036 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8037 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8038 &quot;x&quot;: 3.14, # X coordinate.
8039 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8040 },
8041 ],
8042 &quot;vertices&quot;: [ # The bounding polygon vertices.
8043 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8044 &quot;x&quot;: 42, # X coordinate.
8045 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8046 },
8047 ],
8048 },
8049 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8050 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8051 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8052 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8053 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8054 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8055 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8056 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8057 },
8058 ],
8059 },
8060 },
8061 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
8062 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
8063 &quot;parents&quot;: [ # References to the original elements that are replaced.
8064 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
8065 &quot;id&quot;: 42, # The id of the parent provenance.
8066 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
8067 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
8068 },
8069 ],
8070 &quot;revision&quot;: 42, # The index of the revision that produced this element.
8071 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
8072 },
8073 },
8074 ],
8075 &quot;pageNumber&quot;: 42, # 1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.
8076 &quot;paragraphs&quot;: [ # A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.
8077 { # A collection of lines that a human would perceive as a paragraph.
8078 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8079 { # Detected language for a structural component.
8080 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8081 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8082 },
8083 ],
8084 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Paragraph.
8085 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8086 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8087 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8088 &quot;x&quot;: 3.14, # X coordinate.
8089 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8090 },
8091 ],
8092 &quot;vertices&quot;: [ # The bounding polygon vertices.
8093 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8094 &quot;x&quot;: 42, # X coordinate.
8095 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8096 },
8097 ],
8098 },
8099 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8100 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8101 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8102 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8103 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8104 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8105 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8106 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8107 },
8108 ],
8109 },
8110 },
8111 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
8112 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
8113 &quot;parents&quot;: [ # References to the original elements that are replaced.
8114 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
8115 &quot;id&quot;: 42, # The id of the parent provenance.
8116 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
8117 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
8118 },
8119 ],
8120 &quot;revision&quot;: 42, # The index of the revision that produced this element.
8121 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
8122 },
8123 },
8124 ],
8125 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this page.
8126 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
8127 &quot;parents&quot;: [ # References to the original elements that are replaced.
8128 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
8129 &quot;id&quot;: 42, # The id of the parent provenance.
8130 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
8131 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
8132 },
8133 ],
8134 &quot;revision&quot;: 42, # The index of the revision that produced this element.
8135 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
8136 },
8137 &quot;symbols&quot;: [ # A list of visually detected symbols on the page.
8138 { # A detected symbol.
8139 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8140 { # Detected language for a structural component.
8141 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8142 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8143 },
8144 ],
8145 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Symbol.
8146 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8147 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8148 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8149 &quot;x&quot;: 3.14, # X coordinate.
8150 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8151 },
8152 ],
8153 &quot;vertices&quot;: [ # The bounding polygon vertices.
8154 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8155 &quot;x&quot;: 42, # X coordinate.
8156 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8157 },
8158 ],
8159 },
8160 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8161 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8162 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8163 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8164 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8165 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8166 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8167 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8168 },
8169 ],
8170 },
8171 },
8172 },
8173 ],
8174 &quot;tables&quot;: [ # A list of visually detected tables on the page.
8175 { # A table representation similar to HTML table structure.
8176 &quot;bodyRows&quot;: [ # Body rows of the table.
8177 { # A row of table cells.
8178 &quot;cells&quot;: [ # Cells that make up this row.
8179 { # A cell representation inside the table.
8180 &quot;colSpan&quot;: 42, # How many columns this cell spans.
8181 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8182 { # Detected language for a structural component.
8183 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8184 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8185 },
8186 ],
8187 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
8188 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8189 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8190 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8191 &quot;x&quot;: 3.14, # X coordinate.
8192 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8193 },
8194 ],
8195 &quot;vertices&quot;: [ # The bounding polygon vertices.
8196 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8197 &quot;x&quot;: 42, # X coordinate.
8198 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8199 },
8200 ],
8201 },
8202 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8203 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8204 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8205 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8206 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8207 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8208 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8209 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8210 },
8211 ],
8212 },
8213 },
8214 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
8215 },
8216 ],
8217 },
8218 ],
8219 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8220 { # Detected language for a structural component.
8221 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8222 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8223 },
8224 ],
8225 &quot;headerRows&quot;: [ # Header rows of the table.
8226 { # A row of table cells.
8227 &quot;cells&quot;: [ # Cells that make up this row.
8228 { # A cell representation inside the table.
8229 &quot;colSpan&quot;: 42, # How many columns this cell spans.
8230 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8231 { # Detected language for a structural component.
8232 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8233 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8234 },
8235 ],
8236 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for TableCell.
8237 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8238 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8239 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8240 &quot;x&quot;: 3.14, # X coordinate.
8241 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8242 },
8243 ],
8244 &quot;vertices&quot;: [ # The bounding polygon vertices.
8245 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8246 &quot;x&quot;: 42, # X coordinate.
8247 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8248 },
8249 ],
8250 },
8251 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8252 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8253 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8254 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8255 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8256 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8257 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8258 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8259 },
8260 ],
8261 },
8262 },
8263 &quot;rowSpan&quot;: 42, # How many rows this cell spans.
8264 },
8265 ],
8266 },
8267 ],
8268 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Table.
8269 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8270 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8271 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8272 &quot;x&quot;: 3.14, # X coordinate.
8273 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8274 },
8275 ],
8276 &quot;vertices&quot;: [ # The bounding polygon vertices.
8277 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8278 &quot;x&quot;: 42, # X coordinate.
8279 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8280 },
8281 ],
8282 },
8283 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8284 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8285 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8286 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8287 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8288 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8289 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8290 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8291 },
8292 ],
8293 },
8294 },
8295 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this table.
8296 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
8297 &quot;parents&quot;: [ # References to the original elements that are replaced.
8298 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
8299 &quot;id&quot;: 42, # The id of the parent provenance.
8300 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
8301 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
8302 },
8303 ],
8304 &quot;revision&quot;: 42, # The index of the revision that produced this element.
8305 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
8306 },
8307 },
8308 ],
8309 &quot;tokens&quot;: [ # A list of visually detected tokens on the page.
8310 { # A detected token.
8311 &quot;detectedBreak&quot;: { # Detected break at the end of a Token. # Detected break at the end of a Token.
8312 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
8313 },
8314 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8315 { # Detected language for a structural component.
8316 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8317 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8318 },
8319 ],
8320 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for Token.
8321 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8322 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8323 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8324 &quot;x&quot;: 3.14, # X coordinate.
8325 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8326 },
8327 ],
8328 &quot;vertices&quot;: [ # The bounding polygon vertices.
8329 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8330 &quot;x&quot;: 42, # X coordinate.
8331 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8332 },
8333 ],
8334 },
8335 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8336 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8337 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8338 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8339 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8340 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8341 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8342 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8343 },
8344 ],
8345 },
8346 },
8347 &quot;provenance&quot;: { # Structure to identify provenance relationships between annotations in different revisions. # The history of this annotation.
8348 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
8349 &quot;parents&quot;: [ # References to the original elements that are replaced.
8350 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
8351 &quot;id&quot;: 42, # The id of the parent provenance.
8352 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
8353 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
8354 },
8355 ],
8356 &quot;revision&quot;: 42, # The index of the revision that produced this element.
8357 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
8358 },
8359 &quot;styleInfo&quot;: { # Font and other text style attributes. # Text style attributes.
8360 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the background.
8361 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
8362 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8363 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
8364 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
8365 },
8366 &quot;bold&quot;: True or False, # Whether the text is bold (equivalent to font_weight is at least `700`).
8367 &quot;fontSize&quot;: 42, # Font size in points (`1` point is `¹⁄₇₂` inches).
8368 &quot;fontType&quot;: &quot;A String&quot;, # Name or style of the font.
8369 &quot;fontWeight&quot;: 42, # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.
8370 &quot;handwritten&quot;: True or False, # Whether the text is handwritten.
8371 &quot;italic&quot;: True or False, # Whether the text is italic.
8372 &quot;letterSpacing&quot;: 3.14, # Letter spacing in points.
8373 &quot;pixelFontSize&quot;: 3.14, # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
8374 &quot;smallcaps&quot;: True or False, # Whether the text is in small caps. This feature is not supported yet.
8375 &quot;strikeout&quot;: True or False, # Whether the text is strikethrough. This feature is not supported yet.
8376 &quot;subscript&quot;: True or False, # Whether the text is a subscript. This feature is not supported yet.
8377 &quot;superscript&quot;: True or False, # Whether the text is a superscript. This feature is not supported yet.
8378 &quot;textColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Color of the text.
8379 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
8380 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8381 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
8382 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
8383 },
8384 &quot;underlined&quot;: True or False, # Whether the text is underlined.
8385 },
8386 },
8387 ],
8388 &quot;transforms&quot;: [ # Transformation matrices that were applied to the original document image to produce Page.image.
8389 { # Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.
8390 &quot;cols&quot;: 42, # Number of columns in the matrix.
8391 &quot;data&quot;: &quot;A String&quot;, # The matrix data.
8392 &quot;rows&quot;: 42, # Number of rows in the matrix.
8393 &quot;type&quot;: 42, # This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
8394 },
8395 ],
8396 &quot;visualElements&quot;: [ # A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.
8397 { # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
8398 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
8399 { # Detected language for a structural component.
8400 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range `[0, 1]`.
8401 &quot;languageCode&quot;: &quot;A String&quot;, # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
8402 },
8403 ],
8404 &quot;layout&quot;: { # Visual element describing a layout unit on a page. # Layout for VisualElement.
8405 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the Layout.
8406 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
8407 { # A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
8408 &quot;x&quot;: 3.14, # X coordinate.
8409 &quot;y&quot;: 3.14, # Y coordinate (starts from the top of the image).
8410 },
8411 ],
8412 &quot;vertices&quot;: [ # The bounding polygon vertices.
8413 { # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
8414 &quot;x&quot;: 42, # X coordinate.
8415 &quot;y&quot;: 42, # Y coordinate (starts from the top of the image).
8416 },
8417 ],
8418 },
8419 &quot;confidence&quot;: 3.14, # Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`.
8420 &quot;orientation&quot;: &quot;A String&quot;, # Detected orientation for the Layout.
8421 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8422 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8423 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8424 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8425 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8426 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8427 },
8428 ],
8429 },
8430 },
8431 &quot;type&quot;: &quot;A String&quot;, # Type of the VisualElement.
8432 },
8433 ],
8434 },
8435 ],
8436 &quot;revisions&quot;: [ # Placeholder. Revision history of this document.
8437 { # Contains past or forward revisions of this document.
8438 &quot;agent&quot;: &quot;A String&quot;, # If the change was made by a person specify the name or id of that person.
8439 &quot;createTime&quot;: &quot;A String&quot;, # The time that the revision was created, internally generated by doc proto storage at the time of create.
8440 &quot;humanReview&quot;: { # Human Review information of the document. # Human Review information of this revision.
8441 &quot;state&quot;: &quot;A String&quot;, # Human review state. e.g. `requested`, `succeeded`, `rejected`.
8442 &quot;stateMessage&quot;: &quot;A String&quot;, # A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.
8443 },
8444 &quot;id&quot;: &quot;A String&quot;, # Id of the revision, internally generated by doc proto storage. Unique within the context of the document.
8445 &quot;parent&quot;: [ # The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.
8446 42,
8447 ],
8448 &quot;parentIds&quot;: [ # The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.
8449 &quot;A String&quot;,
8450 ],
8451 &quot;processor&quot;: &quot;A String&quot;, # If the annotation was made by processor identify the processor by its resource name.
8452 },
8453 ],
8454 &quot;shardInfo&quot;: { # For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is. # Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
8455 &quot;shardCount&quot;: &quot;A String&quot;, # Total number of shards.
8456 &quot;shardIndex&quot;: &quot;A String&quot;, # The 0-based index of this shard.
8457 &quot;textOffset&quot;: &quot;A String&quot;, # The index of the first character in Document.text in the overall document global text.
8458 },
8459 &quot;text&quot;: &quot;A String&quot;, # Optional. UTF-8 encoded text in reading order from the document.
8460 &quot;textChanges&quot;: [ # Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
8461 { # This message is used for text changes aka. OCR corrections.
8462 &quot;changedText&quot;: &quot;A String&quot;, # The text that replaces the text identified in the `text_anchor`.
8463 &quot;provenance&quot;: [ # The history of this annotation.
8464 { # Structure to identify provenance relationships between annotations in different revisions.
8465 &quot;id&quot;: 42, # The Id of this operation. Needs to be unique within the scope of the revision.
8466 &quot;parents&quot;: [ # References to the original elements that are replaced.
8467 { # The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.
8468 &quot;id&quot;: 42, # The id of the parent provenance.
8469 &quot;index&quot;: 42, # The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.
8470 &quot;revision&quot;: 42, # The index of the index into current revision&#x27;s parent_ids list.
8471 },
8472 ],
8473 &quot;revision&quot;: 42, # The index of the revision that produced this element.
8474 &quot;type&quot;: &quot;A String&quot;, # The type of provenance operation.
8475 },
8476 ],
8477 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index.
8478 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8479 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8480 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8481 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8482 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8483 },
8484 ],
8485 },
8486 },
8487 ],
8488 &quot;textStyles&quot;: [ # Styles for the Document.text.
8489 { # Annotation for common text style attributes. This adheres to CSS conventions as much as possible.
8490 &quot;backgroundColor&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text background color.
8491 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
8492 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8493 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
8494 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
8495 },
8496 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor&#x27;s `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn&#x27;t have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha &lt;= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!(&#x27;alpha&#x27; in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(&#x27;,&#x27;); return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = [&#x27;#&#x27;]; for (var i = 0; i &lt; missingZeros; i++) { resultBuilder.push(&#x27;0&#x27;); } resultBuilder.push(hexString); return resultBuilder.join(&#x27;&#x27;); }; // ... # Text color.
8497 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
8498 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
8499 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
8500 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
8501 },
8502 &quot;fontFamily&quot;: &quot;A String&quot;, # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp
8503 &quot;fontSize&quot;: { # Font size with unit. # Font size.
8504 &quot;size&quot;: 3.14, # Font size for the text.
8505 &quot;unit&quot;: &quot;A String&quot;, # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
8506 },
8507 &quot;fontWeight&quot;: &quot;A String&quot;, # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.
8508 &quot;textAnchor&quot;: { # Text reference indexing into the Document.text. # Text anchor indexing into the Document.text.
8509 &quot;content&quot;: &quot;A String&quot;, # Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
8510 &quot;textSegments&quot;: [ # The text segments from the Document.text.
8511 { # A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset
8512 &quot;endIndex&quot;: &quot;A String&quot;, # TextSegment half open end UTF-8 char index in the Document.text.
8513 &quot;startIndex&quot;: &quot;A String&quot;, # TextSegment start UTF-8 char index in the Document.text.
8514 },
8515 ],
8516 },
8517 &quot;textDecoration&quot;: &quot;A String&quot;, # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard.
8518 &quot;textStyle&quot;: &quot;A String&quot;, # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.
8519 },
8520 ],
8521 &quot;uri&quot;: &quot;A String&quot;, # Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).
8522 },
8523 &quot;contentCategory&quot;: &quot;A String&quot;, # Indicates the category (image, audio, video etc.) of the original content.
8524 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the document is created.
8525 &quot;creator&quot;: &quot;A String&quot;, # The user who creates the document.
8526 &quot;displayName&quot;: &quot;A String&quot;, # Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the &#x27;title&#x27; field as &#x27;title&#x27; is optional and stores the top heading in the document.
8527 &quot;displayUri&quot;: &quot;A String&quot;, # Uri to display the document, for example, in the UI.
8528 &quot;dispositionTime&quot;: &quot;A String&quot;, # Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable.
8529 &quot;documentSchemaName&quot;: &quot;A String&quot;, # The Document schema name. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
8530 &quot;inlineRawDocument&quot;: &quot;A String&quot;, # Raw document content.
8531 &quot;legalHold&quot;: True or False, # Output only. Indicates if the document has a legal hold on it.
8532 &quot;name&quot;: &quot;A String&quot;, # The resource name of the document. Format: projects/{project_number}/locations/{location}/documents/{document_id}. The name is ignored when creating a document.
8533 &quot;plainText&quot;: &quot;A String&quot;, # Other document format, such as PPTX, XLXS
8534 &quot;properties&quot;: [ # List of values that are user supplied metadata.
8535 { # Property of a document.
8536 &quot;dateTimeValues&quot;: { # DateTime values. # Date time property values. It is not supported by CMEK compliant deployment.
8537 &quot;values&quot;: [ # List of datetime values. Both OffsetDateTime and ZonedDateTime are supported.
8538 { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations.
8539 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
8540 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
8541 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
8542 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
8543 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
8544 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
8545 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
8546 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
8547 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
8548 },
8549 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
8550 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
8551 },
8552 ],
8553 },
8554 &quot;enumValues&quot;: { # Enum values. # Enum property values.
8555 &quot;values&quot;: [ # List of enum values.
8556 &quot;A String&quot;,
8557 ],
8558 },
8559 &quot;floatValues&quot;: { # Float values. # Float property values.
8560 &quot;values&quot;: [ # List of float values.
8561 3.14,
8562 ],
8563 },
8564 &quot;integerValues&quot;: { # Integer values. # Integer property values.
8565 &quot;values&quot;: [ # List of integer values.
8566 42,
8567 ],
8568 },
8569 &quot;mapProperty&quot;: { # Map property value. Represents a structured entries of key value pairs, consisting of field names which map to dynamically typed values. # Map property values.
8570 &quot;fields&quot;: { # Unordered map of dynamically typed values.
8571 &quot;a_key&quot;: { # `Value` represents a dynamically typed value which can be either be a float, a integer, a string, or a datetime value. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.
8572 &quot;booleanValue&quot;: True or False, # Represents a boolean value.
8573 &quot;datetimeValue&quot;: { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user&#x27;s timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application&#x27;s limitations. # Represents a datetime value.
8574 &quot;day&quot;: 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
8575 &quot;hours&quot;: 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value &quot;24:00:00&quot; for scenarios like business closing time.
8576 &quot;minutes&quot;: 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
8577 &quot;month&quot;: 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
8578 &quot;nanos&quot;: 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
8579 &quot;seconds&quot;: 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
8580 &quot;timeZone&quot;: { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
8581 &quot;id&quot;: &quot;A String&quot;, # IANA Time Zone Database time zone. For example &quot;America/New_York&quot;.
8582 &quot;version&quot;: &quot;A String&quot;, # Optional. IANA Time Zone Database version number. For example &quot;2019a&quot;.
8583 },
8584 &quot;utcOffset&quot;: &quot;A String&quot;, # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
8585 &quot;year&quot;: 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
8586 },
8587 &quot;enumValue&quot;: { # Represents the string value of the enum field. # Represents an enum value.
8588 &quot;value&quot;: &quot;A String&quot;, # String value of the enum field. This must match defined set of enums in document schema using EnumTypeOptions.
8589 },
8590 &quot;floatValue&quot;: 3.14, # Represents a float value.
8591 &quot;intValue&quot;: 42, # Represents a integer value.
8592 &quot;stringValue&quot;: &quot;A String&quot;, # Represents a string value.
8593 &quot;timestampValue&quot;: { # Timestamp value type. # Represents a timestamp value.
8594 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
8595 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
8596 },
8597 },
8598 },
8599 },
8600 &quot;name&quot;: &quot;A String&quot;, # Required. Must match the name of a PropertyDefinition in the DocumentSchema.
8601 &quot;propertyValues&quot;: { # Property values. # Nested structured data property values.
8602 &quot;properties&quot;: [ # List of property values.
8603 # Object with schema name: GoogleCloudContentwarehouseV1Property
8604 ],
8605 },
8606 &quot;textValues&quot;: { # String/text values. # String/text property values.
8607 &quot;values&quot;: [ # List of text values.
8608 &quot;A String&quot;,
8609 ],
8610 },
8611 &quot;timestampValues&quot;: { # Timestamp values. # Timestamp property values. It is not supported by CMEK compliant deployment.
8612 &quot;values&quot;: [ # List of timestamp values.
8613 { # Timestamp value type.
8614 &quot;textValue&quot;: &quot;A String&quot;, # The string must represent a valid instant in UTC and is parsed using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. &quot;2013-09-29T18:46:19Z&quot;
8615 &quot;timestampValue&quot;: &quot;A String&quot;, # Timestamp value
8616 },
8617 ],
8618 },
8619 },
8620 ],
8621 &quot;rawDocumentFileType&quot;: &quot;A String&quot;, # This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF.
8622 &quot;rawDocumentPath&quot;: &quot;A String&quot;, # Raw document file in Cloud Storage path.
8623 &quot;referenceId&quot;: &quot;A String&quot;, # The reference ID set by customers. Must be unique per project and location.
8624 &quot;textExtractionDisabled&quot;: True or False, # If true, text extraction will not be performed.
8625 &quot;textExtractionEnabled&quot;: True or False, # If true, text extraction will be performed.
8626 &quot;title&quot;: &quot;A String&quot;, # Title that describes the document. This can be the top heading or text that describes the document.
8627 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time when the document is last updated.
8628 &quot;updater&quot;: &quot;A String&quot;, # The user who lastly updates the document.
8629 },
8630 &quot;matchedTokenPageIndices&quot;: [ # Return the 1-based page indices where those pages have one or more matched tokens.
8631 &quot;A String&quot;,
8632 ],
8633 &quot;qaResult&quot;: { # Additional result info for the question-answering feature. # Experimental. Additional result info if the question-answering feature is enabled.
8634 &quot;confidenceScore&quot;: 3.14, # The calibrated confidence score for this document, in the range [0., 1.]. This represents the confidence level for whether the returned document and snippet answers the user&#x27;s query.
8635 &quot;highlights&quot;: [ # Highlighted sections in the snippet.
8636 { # A text span in the search text snippet that represents a highlighted section (answer context, highly relevant sentence, etc.).
8637 &quot;endIndex&quot;: 42, # End index of the highlight, exclusive.
8638 &quot;startIndex&quot;: 42, # Start index of the highlight.
8639 },
8640 ],
8641 },
8642 &quot;searchTextSnippet&quot;: &quot;A String&quot;, # Contains snippets of text from the document full raw text that most closely match a search query&#x27;s keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags. If the question-answering feature is enabled, this field will instead contain a snippet that answers the user&#x27;s natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.
8643 },
8644 ],
8645 &quot;metadata&quot;: { # Additional information returned to client, such as debugging information. # Additional information for the API invocation, such as the request tracking id.
8646 &quot;requestId&quot;: &quot;A String&quot;, # A unique id associated with this call. This id is logged for tracking purpose.
8647 },
8648 &quot;nextPageToken&quot;: &quot;A String&quot;, # The token that specifies the starting position of the next page of results. This field is empty if there are no more results.
8649 &quot;questionAnswer&quot;: &quot;A String&quot;, # Experimental. Question answer from the query against the document.
8650 &quot;totalSize&quot;: 42, # The total number of matched documents which is available only if the client set SearchDocumentsRequest.require_total_size to `true` or set SearchDocumentsRequest.total_result_size to `ESTIMATED_SIZE` or `ACTUAL_SIZE`. Otherwise, the value will be `-1`. Typically a UI would handle this condition by displaying &quot;of many&quot;, for example: &quot;Displaying 10 of many&quot;.
8651 }</pre>
8652 </div>
8653
8654 <div class="method">
8655 <code class="details" id="search_next">search_next()</code>
8656 <pre>Retrieves the next page of results.
8657
8658 Args:
8659 previous_request: The request for the previous page. (required)
8660 previous_response: The response from the request for the previous page. (required)
8661
8662 Returns:
8663 A request object that you can call &#x27;execute()&#x27; on to request the next
8664 page. Returns None if there are no more items in the collection.
8665 </pre>
8666 </div>
8667
8668 <div class="method">
8669 <code class="details" id="setAcl">setAcl(resource, body=None, x__xgafv=None)</code>
8670 <pre>Sets the access control policy for a resource. Replaces any existing policy.
8671
8672 Args:
8673 resource: string, Required. REQUIRED: The resource for which the policy is being requested. Format for document: projects/{project_number}/locations/{location}/documents/{document_id}. Format for collection: projects/{project_number}/locations/{location}/collections/{collection_id}. Format for project: projects/{project_number}. (required)
8674 body: object, The request body.
8675 The object takes the form of:
8676
8677 { # Request message for DocumentService.SetAcl.
8678 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # Required. REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. This refers to an Identity and Access (IAM) policy, which specifies access controls for the Document. You can set ACL with condition for projects only. Supported operators are: `=`, `!=`, `&lt;`, `&lt;=`, `&gt;`, and `&gt;=` where the left of the operator is `DocumentSchemaId` or property name and the right of the operator is a number or a quoted string. You must escape backslash (\\) and quote (\&quot;) characters. Boolean expressions (AND/OR) are supported up to 3 levels of nesting (for example, &quot;((A AND B AND C) OR D) AND E&quot;), a maximum of 10 comparisons are allowed in the expression. The expression must be &lt; 6000 bytes in length. Sample condition: `&quot;DocumentSchemaId = \&quot;some schema id\&quot; OR SchemaId.floatPropertyName &gt;= 10&quot;`
8679 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
8680 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
8681 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
8682 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
8683 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
8684 &quot;A String&quot;,
8685 ],
8686 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
8687 },
8688 ],
8689 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
8690 },
8691 ],
8692 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
8693 { # Associates `members`, or principals, with a `role`.
8694 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
8695 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
8696 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
8697 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
8698 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
8699 },
8700 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
8701 &quot;A String&quot;,
8702 ],
8703 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
8704 },
8705 ],
8706 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
8707 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
8708 },
8709 &quot;projectOwner&quot;: True or False, # For Set Project ACL only. Authorization check for end user will be ignored when project_owner=true.
8710 &quot;requestMetadata&quot;: { # Meta information is used to improve the performance of the service. # The meta information collected about the end user, used to enforce access control for the service.
8711 &quot;userInfo&quot;: { # The user information. # Provides user unique identification and groups information.
8712 &quot;groupIds&quot;: [ # The unique group identifications which the user is belong to. The format is &quot;group:[email protected]&quot;;
8713 &quot;A String&quot;,
8714 ],
8715 &quot;id&quot;: &quot;A String&quot;, # A unique user identification string, as determined by the client. The maximum number of allowed characters is 255. Allowed characters include numbers 0 to 9, uppercase and lowercase letters, and restricted special symbols (:, @, +, -, _, ~) The format is &quot;user:[email protected]&quot;;
8716 },
8717 },
8718 }
8719
8720 x__xgafv: string, V1 error format.
8721 Allowed values
8722 1 - v1 error format
8723 2 - v2 error format
8724
8725 Returns:
8726 An object of the form:
8727
8728 { # Response message for DocumentService.SetAcl.
8729 &quot;metadata&quot;: { # Additional information returned to client, such as debugging information. # Additional information for the API invocation, such as the request tracking id.
8730 &quot;requestId&quot;: &quot;A String&quot;, # A unique id associated with this call. This id is logged for tracking purpose.
8731 },
8732 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot;, &quot;group:[email protected]&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:[email protected]&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:[email protected]&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # The policy will be attached to a resource (e.g. projecct, document).
8733 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
8734 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `[email protected]` from DATA_READ logging, and `[email protected]` from DATA_WRITE logging.
8735 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
8736 { # Provides the configuration for logging a type of permissions. Example: { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:[email protected]&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] } This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting [email protected] from DATA_READ logging.
8737 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
8738 &quot;A String&quot;,
8739 ],
8740 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
8741 },
8742 ],
8743 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
8744 },
8745 ],
8746 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:[email protected]`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
8747 { # Associates `members`, or principals, with a `role`.
8748 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
8749 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
8750 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
8751 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
8752 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
8753 },
8754 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `[email protected]` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `[email protected]`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `[email protected]`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `[email protected]?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
8755 &quot;A String&quot;,
8756 ],
8757 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
8758 },
8759 ],
8760 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
8761 &quot;version&quot;: 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
8762 },
8763 }</pre>
8764 </div>
8765
8766 </body></html>