google-apis-documentai_v1beta3 0.96.0 → 0.97.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2065,6 +2065,11 @@ module Google
2065
2065
  class GoogleCloudDocumentaiV1beta1Document
2066
2066
  include Google::Apis::Core::Hashable
2067
2067
 
2068
+ # Represents the chunks that the document is divided into.
2069
+ # Corresponds to the JSON property `chunkedDocument`
2070
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocument]
2071
+ attr_accessor :chunked_document
2072
+
2068
2073
  # Optional. Inline document content, represented as a stream of bytes. Note: As
2069
2074
  # with all `bytes` fields, protobuffers use a pure binary representation,
2070
2075
  # whereas JSON representations use base64.
@@ -2073,6 +2078,12 @@ module Google
2073
2078
  # @return [String]
2074
2079
  attr_accessor :content
2075
2080
 
2081
+ # Represents the parsed layout of a document as a collection of blocks that the
2082
+ # document is divided into.
2083
+ # Corresponds to the JSON property `documentLayout`
2084
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayout]
2085
+ attr_accessor :document_layout
2086
+
2076
2087
  # A list of entities detected on Document.text. For document shards, entities in
2077
2088
  # this list may cross shard boundaries.
2078
2089
  # Corresponds to the JSON property `entities`
@@ -2147,7 +2158,9 @@ module Google
2147
2158
 
2148
2159
  # Update properties of this object
2149
2160
  def update!(**args)
2161
+ @chunked_document = args[:chunked_document] if args.key?(:chunked_document)
2150
2162
  @content = args[:content] if args.key?(:content)
2163
+ @document_layout = args[:document_layout] if args.key?(:document_layout)
2151
2164
  @entities = args[:entities] if args.key?(:entities)
2152
2165
  @entity_relations = args[:entity_relations] if args.key?(:entity_relations)
2153
2166
  @error = args[:error] if args.key?(:error)
@@ -2162,72 +2175,58 @@ module Google
2162
2175
  end
2163
2176
  end
2164
2177
 
2165
- # An entity that could be a phrase in the text or a property that belongs to the
2166
- # document. It is a known entity type, such as a person, an organization, or
2167
- # location.
2168
- class GoogleCloudDocumentaiV1beta1DocumentEntity
2178
+ # Represents the chunks that the document is divided into.
2179
+ class GoogleCloudDocumentaiV1beta1DocumentChunkedDocument
2169
2180
  include Google::Apis::Core::Hashable
2170
2181
 
2171
- # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
2172
- # Corresponds to the JSON property `confidence`
2173
- # @return [Float]
2174
- attr_accessor :confidence
2175
-
2176
- # Optional. Canonical id. This will be a unique value in the entity list for
2177
- # this document.
2178
- # Corresponds to the JSON property `id`
2179
- # @return [String]
2180
- attr_accessor :id
2182
+ # List of chunks.
2183
+ # Corresponds to the JSON property `chunks`
2184
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk>]
2185
+ attr_accessor :chunks
2181
2186
 
2182
- # Optional. Deprecated. Use `id` field instead.
2183
- # Corresponds to the JSON property `mentionId`
2184
- # @return [String]
2185
- attr_accessor :mention_id
2187
+ def initialize(**args)
2188
+ update!(**args)
2189
+ end
2186
2190
 
2187
- # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
2188
- # Corresponds to the JSON property `mentionText`
2189
- # @return [String]
2190
- attr_accessor :mention_text
2191
+ # Update properties of this object
2192
+ def update!(**args)
2193
+ @chunks = args[:chunks] if args.key?(:chunks)
2194
+ end
2195
+ end
2191
2196
 
2192
- # Parsed and normalized entity value.
2193
- # Corresponds to the JSON property `normalizedValue`
2194
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue]
2195
- attr_accessor :normalized_value
2197
+ # Represents a chunk.
2198
+ class GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk
2199
+ include Google::Apis::Core::Hashable
2196
2200
 
2197
- # Referencing the visual context of the entity in the Document.pages. Page
2198
- # anchors can be cross-page, consist of multiple bounding polygons and
2199
- # optionally reference specific layout element types.
2200
- # Corresponds to the JSON property `pageAnchor`
2201
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageAnchor]
2202
- attr_accessor :page_anchor
2201
+ # ID of the chunk.
2202
+ # Corresponds to the JSON property `chunkId`
2203
+ # @return [String]
2204
+ attr_accessor :chunk_id
2203
2205
 
2204
- # Optional. Entities can be nested to form a hierarchical data structure
2205
- # representing the content in the document.
2206
- # Corresponds to the JSON property `properties`
2207
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentEntity>]
2208
- attr_accessor :properties
2206
+ # Text content of the chunk.
2207
+ # Corresponds to the JSON property `content`
2208
+ # @return [String]
2209
+ attr_accessor :content
2209
2210
 
2210
- # Structure to identify provenance relationships between annotations in
2211
- # different revisions.
2212
- # Corresponds to the JSON property `provenance`
2213
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2214
- attr_accessor :provenance
2211
+ # Page footers associated with the chunk.
2212
+ # Corresponds to the JSON property `pageFooters`
2213
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter>]
2214
+ attr_accessor :page_footers
2215
2215
 
2216
- # Optional. Whether the entity will be redacted for de-identification purposes.
2217
- # Corresponds to the JSON property `redacted`
2218
- # @return [Boolean]
2219
- attr_accessor :redacted
2220
- alias_method :redacted?, :redacted
2216
+ # Page headers associated with the chunk.
2217
+ # Corresponds to the JSON property `pageHeaders`
2218
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader>]
2219
+ attr_accessor :page_headers
2221
2220
 
2222
- # Text reference indexing into the Document.text.
2223
- # Corresponds to the JSON property `textAnchor`
2224
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
2225
- attr_accessor :text_anchor
2221
+ # Represents where the chunk starts and ends in the document.
2222
+ # Corresponds to the JSON property `pageSpan`
2223
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan]
2224
+ attr_accessor :page_span
2226
2225
 
2227
- # Required. Entity type from a schema e.g. `Address`.
2228
- # Corresponds to the JSON property `type`
2229
- # @return [String]
2230
- attr_accessor :type
2226
+ # Unused.
2227
+ # Corresponds to the JSON property `sourceBlockIds`
2228
+ # @return [Array<String>]
2229
+ attr_accessor :source_block_ids
2231
2230
 
2232
2231
  def initialize(**args)
2233
2232
  update!(**args)
@@ -2235,97 +2234,50 @@ module Google
2235
2234
 
2236
2235
  # Update properties of this object
2237
2236
  def update!(**args)
2238
- @confidence = args[:confidence] if args.key?(:confidence)
2239
- @id = args[:id] if args.key?(:id)
2240
- @mention_id = args[:mention_id] if args.key?(:mention_id)
2241
- @mention_text = args[:mention_text] if args.key?(:mention_text)
2242
- @normalized_value = args[:normalized_value] if args.key?(:normalized_value)
2243
- @page_anchor = args[:page_anchor] if args.key?(:page_anchor)
2244
- @properties = args[:properties] if args.key?(:properties)
2245
- @provenance = args[:provenance] if args.key?(:provenance)
2246
- @redacted = args[:redacted] if args.key?(:redacted)
2247
- @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
2248
- @type = args[:type] if args.key?(:type)
2237
+ @chunk_id = args[:chunk_id] if args.key?(:chunk_id)
2238
+ @content = args[:content] if args.key?(:content)
2239
+ @page_footers = args[:page_footers] if args.key?(:page_footers)
2240
+ @page_headers = args[:page_headers] if args.key?(:page_headers)
2241
+ @page_span = args[:page_span] if args.key?(:page_span)
2242
+ @source_block_ids = args[:source_block_ids] if args.key?(:source_block_ids)
2249
2243
  end
2250
2244
  end
2251
2245
 
2252
- # Parsed and normalized entity value.
2253
- class GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue
2246
+ # Represents the page footer associated with the chunk.
2247
+ class GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter
2254
2248
  include Google::Apis::Core::Hashable
2255
2249
 
2256
- # Represents a postal address, e.g. for postal delivery or payments addresses.
2257
- # Given a postal address, a postal service can deliver items to a premise, P.O.
2258
- # Box or similar. It is not intended to model geographical locations (roads,
2259
- # towns, mountains). In typical usage an address would be created via user input
2260
- # or from importing existing data, depending on the type of process. Advice on
2261
- # address input / editing: - Use an internationalization-ready address widget
2262
- # such as https://github.com/google/libaddressinput) - Users should not be
2263
- # presented with UI elements for input or editing of fields outside countries
2264
- # where that field is used. For more guidance on how to use this schema, please
2265
- # see: https://support.google.com/business/answer/6397478
2266
- # Corresponds to the JSON property `addressValue`
2267
- # @return [Google::Apis::DocumentaiV1beta3::GoogleTypePostalAddress]
2268
- attr_accessor :address_value
2269
-
2270
- # Boolean value. Can be used for entities with binary values, or for checkboxes.
2271
- # Corresponds to the JSON property `booleanValue`
2272
- # @return [Boolean]
2273
- attr_accessor :boolean_value
2274
- alias_method :boolean_value?, :boolean_value
2250
+ # Represents where the chunk starts and ends in the document.
2251
+ # Corresponds to the JSON property `pageSpan`
2252
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan]
2253
+ attr_accessor :page_span
2275
2254
 
2276
- # Represents a whole or partial calendar date, such as a birthday. The time of
2277
- # day and time zone are either specified elsewhere or are insignificant. The
2278
- # date is relative to the Gregorian Calendar. This can represent one of the
2279
- # following: * A full date, with non-zero year, month, and day values. * A month
2280
- # and day, with a zero year (for example, an anniversary). * A year on its own,
2281
- # with a zero month and a zero day. * A year and month, with a zero day (for
2282
- # example, a credit card expiration date). Related types: * google.type.
2283
- # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
2284
- # Corresponds to the JSON property `dateValue`
2285
- # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeDate]
2286
- attr_accessor :date_value
2255
+ # Footer in text format.
2256
+ # Corresponds to the JSON property `text`
2257
+ # @return [String]
2258
+ attr_accessor :text
2287
2259
 
2288
- # Represents civil time (or occasionally physical time). This type can represent
2289
- # a civil time in one of a few possible ways: * When utc_offset is set and
2290
- # time_zone is unset: a civil time on a calendar day with a particular offset
2291
- # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a
2292
- # calendar day in a particular time zone. * When neither time_zone nor
2293
- # utc_offset is set: a civil time on a calendar day in local time. The date is
2294
- # relative to the Proleptic Gregorian Calendar. If year, month, or day are 0,
2295
- # the DateTime is considered not to have a specific year, month, or day
2296
- # respectively. This type may also be used to represent a physical time if all
2297
- # the date and time fields are set and either case of the `time_offset` oneof is
2298
- # set. Consider using `Timestamp` message for physical time instead. If your use
2299
- # case also would like to store the user's timezone, that can be done in another
2300
- # field. This type is more flexible than some applications may want. Make sure
2301
- # to document and validate your application's limitations.
2302
- # Corresponds to the JSON property `datetimeValue`
2303
- # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeDateTime]
2304
- attr_accessor :datetime_value
2260
+ def initialize(**args)
2261
+ update!(**args)
2262
+ end
2305
2263
 
2306
- # Float value.
2307
- # Corresponds to the JSON property `floatValue`
2308
- # @return [Float]
2309
- attr_accessor :float_value
2264
+ # Update properties of this object
2265
+ def update!(**args)
2266
+ @page_span = args[:page_span] if args.key?(:page_span)
2267
+ @text = args[:text] if args.key?(:text)
2268
+ end
2269
+ end
2310
2270
 
2311
- # Integer value.
2312
- # Corresponds to the JSON property `integerValue`
2313
- # @return [Fixnum]
2314
- attr_accessor :integer_value
2271
+ # Represents the page header associated with the chunk.
2272
+ class GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader
2273
+ include Google::Apis::Core::Hashable
2315
2274
 
2316
- # Represents an amount of money with its currency type.
2317
- # Corresponds to the JSON property `moneyValue`
2318
- # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeMoney]
2319
- attr_accessor :money_value
2275
+ # Represents where the chunk starts and ends in the document.
2276
+ # Corresponds to the JSON property `pageSpan`
2277
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan]
2278
+ attr_accessor :page_span
2320
2279
 
2321
- # Optional. An optional field to store a normalized string. For some entity
2322
- # types, one of respective `structured_value` fields may also be populated. Also
2323
- # not all the types of `structured_value` will be normalized. For example, some
2324
- # processors may not generate `float` or `integer` normalized text by default.
2325
- # Below are sample formats mapped to structured values. - Money/Currency type (`
2326
- # money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in
2327
- # the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO
2328
- # 8601 text format.
2280
+ # Header in text format.
2329
2281
  # Corresponds to the JSON property `text`
2330
2282
  # @return [String]
2331
2283
  attr_accessor :text
@@ -2336,35 +2288,24 @@ module Google
2336
2288
 
2337
2289
  # Update properties of this object
2338
2290
  def update!(**args)
2339
- @address_value = args[:address_value] if args.key?(:address_value)
2340
- @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
2341
- @date_value = args[:date_value] if args.key?(:date_value)
2342
- @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
2343
- @float_value = args[:float_value] if args.key?(:float_value)
2344
- @integer_value = args[:integer_value] if args.key?(:integer_value)
2345
- @money_value = args[:money_value] if args.key?(:money_value)
2291
+ @page_span = args[:page_span] if args.key?(:page_span)
2346
2292
  @text = args[:text] if args.key?(:text)
2347
2293
  end
2348
2294
  end
2349
2295
 
2350
- # Relationship between Entities.
2351
- class GoogleCloudDocumentaiV1beta1DocumentEntityRelation
2296
+ # Represents where the chunk starts and ends in the document.
2297
+ class GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan
2352
2298
  include Google::Apis::Core::Hashable
2353
2299
 
2354
- # Object entity id.
2355
- # Corresponds to the JSON property `objectId`
2356
- # @return [String]
2357
- attr_accessor :object_id_prop
2358
-
2359
- # Relationship description.
2360
- # Corresponds to the JSON property `relation`
2361
- # @return [String]
2362
- attr_accessor :relation
2300
+ # Page where chunk ends in the document.
2301
+ # Corresponds to the JSON property `pageEnd`
2302
+ # @return [Fixnum]
2303
+ attr_accessor :page_end
2363
2304
 
2364
- # Subject entity id.
2365
- # Corresponds to the JSON property `subjectId`
2366
- # @return [String]
2367
- attr_accessor :subject_id
2305
+ # Page where chunk starts in the document.
2306
+ # Corresponds to the JSON property `pageStart`
2307
+ # @return [Fixnum]
2308
+ attr_accessor :page_start
2368
2309
 
2369
2310
  def initialize(**args)
2370
2311
  update!(**args)
@@ -2372,109 +2313,21 @@ module Google
2372
2313
 
2373
2314
  # Update properties of this object
2374
2315
  def update!(**args)
2375
- @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
2376
- @relation = args[:relation] if args.key?(:relation)
2377
- @subject_id = args[:subject_id] if args.key?(:subject_id)
2316
+ @page_end = args[:page_end] if args.key?(:page_end)
2317
+ @page_start = args[:page_start] if args.key?(:page_start)
2378
2318
  end
2379
2319
  end
2380
2320
 
2381
- # A page in a Document.
2382
- class GoogleCloudDocumentaiV1beta1DocumentPage
2321
+ # Represents the parsed layout of a document as a collection of blocks that the
2322
+ # document is divided into.
2323
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayout
2383
2324
  include Google::Apis::Core::Hashable
2384
2325
 
2385
- # A list of visually detected text blocks on the page. A block has a set of
2386
- # lines (collected into paragraphs) that have a common line-spacing and
2387
- # orientation.
2326
+ # List of blocks in the document.
2388
2327
  # Corresponds to the JSON property `blocks`
2389
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageBlock>]
2328
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock>]
2390
2329
  attr_accessor :blocks
2391
2330
 
2392
- # A list of detected barcodes.
2393
- # Corresponds to the JSON property `detectedBarcodes`
2394
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode>]
2395
- attr_accessor :detected_barcodes
2396
-
2397
- # A list of detected languages together with confidence.
2398
- # Corresponds to the JSON property `detectedLanguages`
2399
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
2400
- attr_accessor :detected_languages
2401
-
2402
- # Dimension for the page.
2403
- # Corresponds to the JSON property `dimension`
2404
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDimension]
2405
- attr_accessor :dimension
2406
-
2407
- # A list of visually detected form fields on the page.
2408
- # Corresponds to the JSON property `formFields`
2409
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageFormField>]
2410
- attr_accessor :form_fields
2411
-
2412
- # Rendered image contents for this page.
2413
- # Corresponds to the JSON property `image`
2414
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageImage]
2415
- attr_accessor :image
2416
-
2417
- # Image quality scores for the page image.
2418
- # Corresponds to the JSON property `imageQualityScores`
2419
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores]
2420
- attr_accessor :image_quality_scores
2421
-
2422
- # Visual element describing a layout unit on a page.
2423
- # Corresponds to the JSON property `layout`
2424
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2425
- attr_accessor :layout
2426
-
2427
- # A list of visually detected text lines on the page. A collection of tokens
2428
- # that a human would perceive as a line.
2429
- # Corresponds to the JSON property `lines`
2430
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLine>]
2431
- attr_accessor :lines
2432
-
2433
- # 1-based index for current Page in a parent Document. Useful when a page is
2434
- # taken out of a Document for individual processing.
2435
- # Corresponds to the JSON property `pageNumber`
2436
- # @return [Fixnum]
2437
- attr_accessor :page_number
2438
-
2439
- # A list of visually detected text paragraphs on the page. A collection of lines
2440
- # that a human would perceive as a paragraph.
2441
- # Corresponds to the JSON property `paragraphs`
2442
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageParagraph>]
2443
- attr_accessor :paragraphs
2444
-
2445
- # Structure to identify provenance relationships between annotations in
2446
- # different revisions.
2447
- # Corresponds to the JSON property `provenance`
2448
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2449
- attr_accessor :provenance
2450
-
2451
- # A list of visually detected symbols on the page.
2452
- # Corresponds to the JSON property `symbols`
2453
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageSymbol>]
2454
- attr_accessor :symbols
2455
-
2456
- # A list of visually detected tables on the page.
2457
- # Corresponds to the JSON property `tables`
2458
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTable>]
2459
- attr_accessor :tables
2460
-
2461
- # A list of visually detected tokens on the page.
2462
- # Corresponds to the JSON property `tokens`
2463
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageToken>]
2464
- attr_accessor :tokens
2465
-
2466
- # Transformation matrices that were applied to the original document image to
2467
- # produce Page.image.
2468
- # Corresponds to the JSON property `transforms`
2469
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageMatrix>]
2470
- attr_accessor :transforms
2471
-
2472
- # A list of detected non-text visual elements e.g. checkbox, signature etc. on
2473
- # the page.
2474
- # Corresponds to the JSON property `visualElements`
2475
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageVisualElement>]
2476
- attr_accessor :visual_elements
2477
-
2478
2331
  def initialize(**args)
2479
2332
  update!(**args)
2480
2333
  end
@@ -2482,35 +2335,38 @@ module Google
2482
2335
  # Update properties of this object
2483
2336
  def update!(**args)
2484
2337
  @blocks = args[:blocks] if args.key?(:blocks)
2485
- @detected_barcodes = args[:detected_barcodes] if args.key?(:detected_barcodes)
2486
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2487
- @dimension = args[:dimension] if args.key?(:dimension)
2488
- @form_fields = args[:form_fields] if args.key?(:form_fields)
2489
- @image = args[:image] if args.key?(:image)
2490
- @image_quality_scores = args[:image_quality_scores] if args.key?(:image_quality_scores)
2491
- @layout = args[:layout] if args.key?(:layout)
2492
- @lines = args[:lines] if args.key?(:lines)
2493
- @page_number = args[:page_number] if args.key?(:page_number)
2494
- @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
2495
- @provenance = args[:provenance] if args.key?(:provenance)
2496
- @symbols = args[:symbols] if args.key?(:symbols)
2497
- @tables = args[:tables] if args.key?(:tables)
2498
- @tokens = args[:tokens] if args.key?(:tokens)
2499
- @transforms = args[:transforms] if args.key?(:transforms)
2500
- @visual_elements = args[:visual_elements] if args.key?(:visual_elements)
2501
2338
  end
2502
2339
  end
2503
2340
 
2504
- # Referencing the visual context of the entity in the Document.pages. Page
2505
- # anchors can be cross-page, consist of multiple bounding polygons and
2506
- # optionally reference specific layout element types.
2507
- class GoogleCloudDocumentaiV1beta1DocumentPageAnchor
2341
+ # Represents a block. A block could be one of the various types (text, table,
2342
+ # list) supported.
2343
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock
2508
2344
  include Google::Apis::Core::Hashable
2509
2345
 
2510
- # One or more references to visual page elements
2511
- # Corresponds to the JSON property `pageRefs`
2512
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef>]
2513
- attr_accessor :page_refs
2346
+ # ID of the block.
2347
+ # Corresponds to the JSON property `blockId`
2348
+ # @return [String]
2349
+ attr_accessor :block_id
2350
+
2351
+ # Represents a list type block.
2352
+ # Corresponds to the JSON property `listBlock`
2353
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock]
2354
+ attr_accessor :list_block
2355
+
2356
+ # Represents where the block starts and ends in the document.
2357
+ # Corresponds to the JSON property `pageSpan`
2358
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan]
2359
+ attr_accessor :page_span
2360
+
2361
+ # Represents a table type block.
2362
+ # Corresponds to the JSON property `tableBlock`
2363
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock]
2364
+ attr_accessor :table_block
2365
+
2366
+ # Represents a text type block.
2367
+ # Corresponds to the JSON property `textBlock`
2368
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock]
2369
+ attr_accessor :text_block
2514
2370
 
2515
2371
  def initialize(**args)
2516
2372
  update!(**args)
@@ -2518,41 +2374,28 @@ module Google
2518
2374
 
2519
2375
  # Update properties of this object
2520
2376
  def update!(**args)
2521
- @page_refs = args[:page_refs] if args.key?(:page_refs)
2377
+ @block_id = args[:block_id] if args.key?(:block_id)
2378
+ @list_block = args[:list_block] if args.key?(:list_block)
2379
+ @page_span = args[:page_span] if args.key?(:page_span)
2380
+ @table_block = args[:table_block] if args.key?(:table_block)
2381
+ @text_block = args[:text_block] if args.key?(:text_block)
2522
2382
  end
2523
2383
  end
2524
2384
 
2525
- # Represents a weak reference to a page element within a document.
2526
- class GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef
2385
+ # Represents a list type block.
2386
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock
2527
2387
  include Google::Apis::Core::Hashable
2528
2388
 
2529
- # A bounding polygon for the detected image annotation.
2530
- # Corresponds to the JSON property `boundingPoly`
2531
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
2532
- attr_accessor :bounding_poly
2533
-
2534
- # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
2535
- # Corresponds to the JSON property `confidence`
2536
- # @return [Float]
2537
- attr_accessor :confidence
2538
-
2539
- # Optional. Deprecated. Use PageRef.bounding_poly instead.
2540
- # Corresponds to the JSON property `layoutId`
2541
- # @return [String]
2542
- attr_accessor :layout_id
2389
+ # List entries that constitute a list block.
2390
+ # Corresponds to the JSON property `listEntries`
2391
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry>]
2392
+ attr_accessor :list_entries
2543
2393
 
2544
- # Optional. The type of the layout element that is being referenced if any.
2545
- # Corresponds to the JSON property `layoutType`
2394
+ # Type of the list_entries (if exist). Available options are `ordered` and `
2395
+ # unordered`.
2396
+ # Corresponds to the JSON property `type`
2546
2397
  # @return [String]
2547
- attr_accessor :layout_type
2548
-
2549
- # Required. Index into the Document.pages element, for example using `Document.
2550
- # pages` to locate the related page element. This field is skipped when its
2551
- # value is the default `0`. See https://developers.google.com/protocol-buffers/
2552
- # docs/proto3#json.
2553
- # Corresponds to the JSON property `page`
2554
- # @return [Fixnum]
2555
- attr_accessor :page
2398
+ attr_accessor :type
2556
2399
 
2557
2400
  def initialize(**args)
2558
2401
  update!(**args)
@@ -2560,34 +2403,20 @@ module Google
2560
2403
 
2561
2404
  # Update properties of this object
2562
2405
  def update!(**args)
2563
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
2564
- @confidence = args[:confidence] if args.key?(:confidence)
2565
- @layout_id = args[:layout_id] if args.key?(:layout_id)
2566
- @layout_type = args[:layout_type] if args.key?(:layout_type)
2567
- @page = args[:page] if args.key?(:page)
2406
+ @list_entries = args[:list_entries] if args.key?(:list_entries)
2407
+ @type = args[:type] if args.key?(:type)
2568
2408
  end
2569
2409
  end
2570
2410
 
2571
- # A block has a set of lines (collected into paragraphs) that have a common line-
2572
- # spacing and orientation.
2573
- class GoogleCloudDocumentaiV1beta1DocumentPageBlock
2411
+ # Represents an entry in the list.
2412
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry
2574
2413
  include Google::Apis::Core::Hashable
2575
2414
 
2576
- # A list of detected languages together with confidence.
2577
- # Corresponds to the JSON property `detectedLanguages`
2578
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
2579
- attr_accessor :detected_languages
2580
-
2581
- # Visual element describing a layout unit on a page.
2582
- # Corresponds to the JSON property `layout`
2583
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2584
- attr_accessor :layout
2585
-
2586
- # Structure to identify provenance relationships between annotations in
2587
- # different revisions.
2588
- # Corresponds to the JSON property `provenance`
2589
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2590
- attr_accessor :provenance
2415
+ # A list entry is a list of blocks. Repeated blocks support further hierarchies
2416
+ # and nested blocks.
2417
+ # Corresponds to the JSON property `blocks`
2418
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock>]
2419
+ attr_accessor :blocks
2591
2420
 
2592
2421
  def initialize(**args)
2593
2422
  update!(**args)
@@ -2595,25 +2424,23 @@ module Google
2595
2424
 
2596
2425
  # Update properties of this object
2597
2426
  def update!(**args)
2598
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2599
- @layout = args[:layout] if args.key?(:layout)
2600
- @provenance = args[:provenance] if args.key?(:provenance)
2427
+ @blocks = args[:blocks] if args.key?(:blocks)
2601
2428
  end
2602
2429
  end
2603
2430
 
2604
- # A detected barcode.
2605
- class GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode
2431
+ # Represents where the block starts and ends in the document.
2432
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan
2606
2433
  include Google::Apis::Core::Hashable
2607
2434
 
2608
- # Encodes the detailed information of a barcode.
2609
- # Corresponds to the JSON property `barcode`
2610
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1Barcode]
2611
- attr_accessor :barcode
2435
+ # Page where block ends in the document.
2436
+ # Corresponds to the JSON property `pageEnd`
2437
+ # @return [Fixnum]
2438
+ attr_accessor :page_end
2612
2439
 
2613
- # Visual element describing a layout unit on a page.
2614
- # Corresponds to the JSON property `layout`
2615
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2616
- attr_accessor :layout
2440
+ # Page where block starts in the document.
2441
+ # Corresponds to the JSON property `pageStart`
2442
+ # @return [Fixnum]
2443
+ attr_accessor :page_start
2617
2444
 
2618
2445
  def initialize(**args)
2619
2446
  update!(**args)
@@ -2621,25 +2448,29 @@ module Google
2621
2448
 
2622
2449
  # Update properties of this object
2623
2450
  def update!(**args)
2624
- @barcode = args[:barcode] if args.key?(:barcode)
2625
- @layout = args[:layout] if args.key?(:layout)
2451
+ @page_end = args[:page_end] if args.key?(:page_end)
2452
+ @page_start = args[:page_start] if args.key?(:page_start)
2626
2453
  end
2627
2454
  end
2628
2455
 
2629
- # Detected language for a structural component.
2630
- class GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage
2456
+ # Represents a table type block.
2457
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock
2631
2458
  include Google::Apis::Core::Hashable
2632
2459
 
2633
- # Confidence of detected language. Range `[0, 1]`.
2634
- # Corresponds to the JSON property `confidence`
2635
- # @return [Float]
2636
- attr_accessor :confidence
2460
+ # Body rows containing main table content.
2461
+ # Corresponds to the JSON property `bodyRows`
2462
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow>]
2463
+ attr_accessor :body_rows
2637
2464
 
2638
- # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#
2639
- # Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
2640
- # Corresponds to the JSON property `languageCode`
2465
+ # Table caption/title.
2466
+ # Corresponds to the JSON property `caption`
2641
2467
  # @return [String]
2642
- attr_accessor :language_code
2468
+ attr_accessor :caption
2469
+
2470
+ # Header rows at the top of the table.
2471
+ # Corresponds to the JSON property `headerRows`
2472
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow>]
2473
+ attr_accessor :header_rows
2643
2474
 
2644
2475
  def initialize(**args)
2645
2476
  update!(**args)
@@ -2647,29 +2478,31 @@ module Google
2647
2478
 
2648
2479
  # Update properties of this object
2649
2480
  def update!(**args)
2650
- @confidence = args[:confidence] if args.key?(:confidence)
2651
- @language_code = args[:language_code] if args.key?(:language_code)
2481
+ @body_rows = args[:body_rows] if args.key?(:body_rows)
2482
+ @caption = args[:caption] if args.key?(:caption)
2483
+ @header_rows = args[:header_rows] if args.key?(:header_rows)
2652
2484
  end
2653
2485
  end
2654
2486
 
2655
- # Dimension for the page.
2656
- class GoogleCloudDocumentaiV1beta1DocumentPageDimension
2487
+ # Represents a cell in a table row.
2488
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell
2657
2489
  include Google::Apis::Core::Hashable
2658
2490
 
2659
- # Page height.
2660
- # Corresponds to the JSON property `height`
2661
- # @return [Float]
2662
- attr_accessor :height
2491
+ # A table cell is a list of blocks. Repeated blocks support further hierarchies
2492
+ # and nested blocks.
2493
+ # Corresponds to the JSON property `blocks`
2494
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock>]
2495
+ attr_accessor :blocks
2663
2496
 
2664
- # Dimension unit.
2665
- # Corresponds to the JSON property `unit`
2666
- # @return [String]
2667
- attr_accessor :unit
2497
+ # How many columns this cell spans.
2498
+ # Corresponds to the JSON property `colSpan`
2499
+ # @return [Fixnum]
2500
+ attr_accessor :col_span
2668
2501
 
2669
- # Page width.
2670
- # Corresponds to the JSON property `width`
2671
- # @return [Float]
2672
- attr_accessor :width
2502
+ # How many rows this cell spans.
2503
+ # Corresponds to the JSON property `rowSpan`
2504
+ # @return [Fixnum]
2505
+ attr_accessor :row_span
2673
2506
 
2674
2507
  def initialize(**args)
2675
2508
  update!(**args)
@@ -2677,62 +2510,20 @@ module Google
2677
2510
 
2678
2511
  # Update properties of this object
2679
2512
  def update!(**args)
2680
- @height = args[:height] if args.key?(:height)
2681
- @unit = args[:unit] if args.key?(:unit)
2682
- @width = args[:width] if args.key?(:width)
2513
+ @blocks = args[:blocks] if args.key?(:blocks)
2514
+ @col_span = args[:col_span] if args.key?(:col_span)
2515
+ @row_span = args[:row_span] if args.key?(:row_span)
2683
2516
  end
2684
2517
  end
2685
2518
 
2686
- # A form field detected on the page.
2687
- class GoogleCloudDocumentaiV1beta1DocumentPageFormField
2519
+ # Represents a row in a table.
2520
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow
2688
2521
  include Google::Apis::Core::Hashable
2689
2522
 
2690
- # Created for Labeling UI to export key text. If corrections were made to the
2691
- # text identified by the `field_name.text_anchor`, this field will contain the
2692
- # correction.
2693
- # Corresponds to the JSON property `correctedKeyText`
2694
- # @return [String]
2695
- attr_accessor :corrected_key_text
2696
-
2697
- # Created for Labeling UI to export value text. If corrections were made to the
2698
- # text identified by the `field_value.text_anchor`, this field will contain the
2699
- # correction.
2700
- # Corresponds to the JSON property `correctedValueText`
2701
- # @return [String]
2702
- attr_accessor :corrected_value_text
2703
-
2704
- # Visual element describing a layout unit on a page.
2705
- # Corresponds to the JSON property `fieldName`
2706
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2707
- attr_accessor :field_name
2708
-
2709
- # Visual element describing a layout unit on a page.
2710
- # Corresponds to the JSON property `fieldValue`
2711
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2712
- attr_accessor :field_value
2713
-
2714
- # A list of detected languages for name together with confidence.
2715
- # Corresponds to the JSON property `nameDetectedLanguages`
2716
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
2717
- attr_accessor :name_detected_languages
2718
-
2719
- # Structure to identify provenance relationships between annotations in
2720
- # different revisions.
2721
- # Corresponds to the JSON property `provenance`
2722
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2723
- attr_accessor :provenance
2724
-
2725
- # A list of detected languages for value together with confidence.
2726
- # Corresponds to the JSON property `valueDetectedLanguages`
2727
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
2728
- attr_accessor :value_detected_languages
2729
-
2730
- # If the value is non-textual, this field represents the type. Current valid
2731
- # values are: - blank (this indicates the `field_value` is normal text) - `
2732
- # unfilled_checkbox` - `filled_checkbox`
2733
- # Corresponds to the JSON property `valueType`
2734
- # @return [String]
2735
- attr_accessor :value_type
2523
+ # A table row is a list of table cells.
2524
+ # Corresponds to the JSON property `cells`
2525
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell>]
2526
+ attr_accessor :cells
2736
2527
 
2737
2528
  def initialize(**args)
2738
2529
  update!(**args)
@@ -2740,69 +2531,31 @@ module Google
2740
2531
 
2741
2532
  # Update properties of this object
2742
2533
  def update!(**args)
2743
- @corrected_key_text = args[:corrected_key_text] if args.key?(:corrected_key_text)
2744
- @corrected_value_text = args[:corrected_value_text] if args.key?(:corrected_value_text)
2745
- @field_name = args[:field_name] if args.key?(:field_name)
2746
- @field_value = args[:field_value] if args.key?(:field_value)
2747
- @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages)
2748
- @provenance = args[:provenance] if args.key?(:provenance)
2749
- @value_detected_languages = args[:value_detected_languages] if args.key?(:value_detected_languages)
2750
- @value_type = args[:value_type] if args.key?(:value_type)
2534
+ @cells = args[:cells] if args.key?(:cells)
2751
2535
  end
2752
2536
  end
2753
2537
 
2754
- # Rendered image contents for this page.
2755
- class GoogleCloudDocumentaiV1beta1DocumentPageImage
2538
+ # Represents a text type block.
2539
+ class GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock
2756
2540
  include Google::Apis::Core::Hashable
2757
2541
 
2758
- # Raw byte content of the image.
2759
- # Corresponds to the JSON property `content`
2760
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
2761
- # @return [String]
2762
- attr_accessor :content
2763
-
2764
- # Height of the image in pixels.
2765
- # Corresponds to the JSON property `height`
2766
- # @return [Fixnum]
2767
- attr_accessor :height
2542
+ # A text block could further have child blocks. Repeated blocks support further
2543
+ # hierarchies and nested blocks.
2544
+ # Corresponds to the JSON property `blocks`
2545
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock>]
2546
+ attr_accessor :blocks
2768
2547
 
2769
- # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/
2770
- # media-types.xhtml) for the image.
2771
- # Corresponds to the JSON property `mimeType`
2548
+ # Text content stored in the block.
2549
+ # Corresponds to the JSON property `text`
2772
2550
  # @return [String]
2773
- attr_accessor :mime_type
2774
-
2775
- # Width of the image in pixels.
2776
- # Corresponds to the JSON property `width`
2777
- # @return [Fixnum]
2778
- attr_accessor :width
2779
-
2780
- def initialize(**args)
2781
- update!(**args)
2782
- end
2783
-
2784
- # Update properties of this object
2785
- def update!(**args)
2786
- @content = args[:content] if args.key?(:content)
2787
- @height = args[:height] if args.key?(:height)
2788
- @mime_type = args[:mime_type] if args.key?(:mime_type)
2789
- @width = args[:width] if args.key?(:width)
2790
- end
2791
- end
2792
-
2793
- # Image quality scores for the page image.
2794
- class GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores
2795
- include Google::Apis::Core::Hashable
2796
-
2797
- # A list of detected defects.
2798
- # Corresponds to the JSON property `detectedDefects`
2799
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect>]
2800
- attr_accessor :detected_defects
2551
+ attr_accessor :text
2801
2552
 
2802
- # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
2803
- # Corresponds to the JSON property `qualityScore`
2804
- # @return [Float]
2805
- attr_accessor :quality_score
2553
+ # Type of the text in the block. Available options are: `paragraph`, `subtitle`,
2554
+ # `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `
2555
+ # footer`.
2556
+ # Corresponds to the JSON property `type`
2557
+ # @return [String]
2558
+ attr_accessor :type
2806
2559
 
2807
2560
  def initialize(**args)
2808
2561
  update!(**args)
@@ -2810,99 +2563,179 @@ module Google
2810
2563
 
2811
2564
  # Update properties of this object
2812
2565
  def update!(**args)
2813
- @detected_defects = args[:detected_defects] if args.key?(:detected_defects)
2814
- @quality_score = args[:quality_score] if args.key?(:quality_score)
2566
+ @blocks = args[:blocks] if args.key?(:blocks)
2567
+ @text = args[:text] if args.key?(:text)
2568
+ @type = args[:type] if args.key?(:type)
2815
2569
  end
2816
2570
  end
2817
2571
 
2818
- # Image Quality Defects
2819
- class GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect
2572
+ # An entity that could be a phrase in the text or a property that belongs to the
2573
+ # document. It is a known entity type, such as a person, an organization, or
2574
+ # location.
2575
+ class GoogleCloudDocumentaiV1beta1DocumentEntity
2820
2576
  include Google::Apis::Core::Hashable
2821
2577
 
2822
- # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong
2823
- # confidence that the defect exists.
2578
+ # Optional. Confidence of detected Schema entity. Range `[0, 1]`.
2824
2579
  # Corresponds to the JSON property `confidence`
2825
2580
  # @return [Float]
2826
2581
  attr_accessor :confidence
2827
2582
 
2828
- # Name of the defect type. Supported values are: - `quality/defect_blurry` - `
2829
- # quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `
2830
- # quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/
2831
- # defect_text_cutoff` - `quality/defect_glare`
2832
- # Corresponds to the JSON property `type`
2583
+ # Optional. Canonical id. This will be a unique value in the entity list for
2584
+ # this document.
2585
+ # Corresponds to the JSON property `id`
2833
2586
  # @return [String]
2834
- attr_accessor :type
2587
+ attr_accessor :id
2835
2588
 
2836
- def initialize(**args)
2837
- update!(**args)
2838
- end
2589
+ # Optional. Deprecated. Use `id` field instead.
2590
+ # Corresponds to the JSON property `mentionId`
2591
+ # @return [String]
2592
+ attr_accessor :mention_id
2839
2593
 
2840
- # Update properties of this object
2841
- def update!(**args)
2842
- @confidence = args[:confidence] if args.key?(:confidence)
2843
- @type = args[:type] if args.key?(:type)
2844
- end
2845
- end
2594
+ # Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.
2595
+ # Corresponds to the JSON property `mentionText`
2596
+ # @return [String]
2597
+ attr_accessor :mention_text
2846
2598
 
2847
- # Visual element describing a layout unit on a page.
2848
- class GoogleCloudDocumentaiV1beta1DocumentPageLayout
2849
- include Google::Apis::Core::Hashable
2599
+ # Parsed and normalized entity value.
2600
+ # Corresponds to the JSON property `normalizedValue`
2601
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue]
2602
+ attr_accessor :normalized_value
2850
2603
 
2851
- # A bounding polygon for the detected image annotation.
2852
- # Corresponds to the JSON property `boundingPoly`
2853
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
2854
- attr_accessor :bounding_poly
2604
+ # Referencing the visual context of the entity in the Document.pages. Page
2605
+ # anchors can be cross-page, consist of multiple bounding polygons and
2606
+ # optionally reference specific layout element types.
2607
+ # Corresponds to the JSON property `pageAnchor`
2608
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageAnchor]
2609
+ attr_accessor :page_anchor
2855
2610
 
2856
- # Confidence of the current Layout within context of the object this layout is
2857
- # for. e.g. confidence can be for a single token, a table, a visual element, etc.
2858
- # depending on context. Range `[0, 1]`.
2859
- # Corresponds to the JSON property `confidence`
2860
- # @return [Float]
2861
- attr_accessor :confidence
2611
+ # Optional. Entities can be nested to form a hierarchical data structure
2612
+ # representing the content in the document.
2613
+ # Corresponds to the JSON property `properties`
2614
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentEntity>]
2615
+ attr_accessor :properties
2862
2616
 
2863
- # Detected orientation for the Layout.
2864
- # Corresponds to the JSON property `orientation`
2865
- # @return [String]
2866
- attr_accessor :orientation
2617
+ # Structure to identify provenance relationships between annotations in
2618
+ # different revisions.
2619
+ # Corresponds to the JSON property `provenance`
2620
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2621
+ attr_accessor :provenance
2622
+
2623
+ # Optional. Whether the entity will be redacted for de-identification purposes.
2624
+ # Corresponds to the JSON property `redacted`
2625
+ # @return [Boolean]
2626
+ attr_accessor :redacted
2627
+ alias_method :redacted?, :redacted
2867
2628
 
2868
2629
  # Text reference indexing into the Document.text.
2869
2630
  # Corresponds to the JSON property `textAnchor`
2870
2631
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
2871
2632
  attr_accessor :text_anchor
2872
2633
 
2634
+ # Required. Entity type from a schema e.g. `Address`.
2635
+ # Corresponds to the JSON property `type`
2636
+ # @return [String]
2637
+ attr_accessor :type
2638
+
2873
2639
  def initialize(**args)
2874
2640
  update!(**args)
2875
2641
  end
2876
2642
 
2877
2643
  # Update properties of this object
2878
2644
  def update!(**args)
2879
- @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
2880
2645
  @confidence = args[:confidence] if args.key?(:confidence)
2881
- @orientation = args[:orientation] if args.key?(:orientation)
2646
+ @id = args[:id] if args.key?(:id)
2647
+ @mention_id = args[:mention_id] if args.key?(:mention_id)
2648
+ @mention_text = args[:mention_text] if args.key?(:mention_text)
2649
+ @normalized_value = args[:normalized_value] if args.key?(:normalized_value)
2650
+ @page_anchor = args[:page_anchor] if args.key?(:page_anchor)
2651
+ @properties = args[:properties] if args.key?(:properties)
2652
+ @provenance = args[:provenance] if args.key?(:provenance)
2653
+ @redacted = args[:redacted] if args.key?(:redacted)
2882
2654
  @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
2655
+ @type = args[:type] if args.key?(:type)
2883
2656
  end
2884
2657
  end
2885
2658
 
2886
- # A collection of tokens that a human would perceive as a line. Does not cross
2887
- # column boundaries, can be horizontal, vertical, etc.
2888
- class GoogleCloudDocumentaiV1beta1DocumentPageLine
2659
+ # Parsed and normalized entity value.
2660
+ class GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue
2889
2661
  include Google::Apis::Core::Hashable
2890
2662
 
2891
- # A list of detected languages together with confidence.
2892
- # Corresponds to the JSON property `detectedLanguages`
2893
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
2894
- attr_accessor :detected_languages
2663
+ # Represents a postal address, e.g. for postal delivery or payments addresses.
2664
+ # Given a postal address, a postal service can deliver items to a premise, P.O.
2665
+ # Box or similar. It is not intended to model geographical locations (roads,
2666
+ # towns, mountains). In typical usage an address would be created via user input
2667
+ # or from importing existing data, depending on the type of process. Advice on
2668
+ # address input / editing: - Use an internationalization-ready address widget
2669
+ # such as https://github.com/google/libaddressinput) - Users should not be
2670
+ # presented with UI elements for input or editing of fields outside countries
2671
+ # where that field is used. For more guidance on how to use this schema, please
2672
+ # see: https://support.google.com/business/answer/6397478
2673
+ # Corresponds to the JSON property `addressValue`
2674
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypePostalAddress]
2675
+ attr_accessor :address_value
2895
2676
 
2896
- # Visual element describing a layout unit on a page.
2897
- # Corresponds to the JSON property `layout`
2898
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2899
- attr_accessor :layout
2677
+ # Boolean value. Can be used for entities with binary values, or for checkboxes.
2678
+ # Corresponds to the JSON property `booleanValue`
2679
+ # @return [Boolean]
2680
+ attr_accessor :boolean_value
2681
+ alias_method :boolean_value?, :boolean_value
2900
2682
 
2901
- # Structure to identify provenance relationships between annotations in
2902
- # different revisions.
2903
- # Corresponds to the JSON property `provenance`
2904
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2905
- attr_accessor :provenance
2683
+ # Represents a whole or partial calendar date, such as a birthday. The time of
2684
+ # day and time zone are either specified elsewhere or are insignificant. The
2685
+ # date is relative to the Gregorian Calendar. This can represent one of the
2686
+ # following: * A full date, with non-zero year, month, and day values. * A month
2687
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
2688
+ # with a zero month and a zero day. * A year and month, with a zero day (for
2689
+ # example, a credit card expiration date). Related types: * google.type.
2690
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
2691
+ # Corresponds to the JSON property `dateValue`
2692
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeDate]
2693
+ attr_accessor :date_value
2694
+
2695
+ # Represents civil time (or occasionally physical time). This type can represent
2696
+ # a civil time in one of a few possible ways: * When utc_offset is set and
2697
+ # time_zone is unset: a civil time on a calendar day with a particular offset
2698
+ # from UTC. * When time_zone is set and utc_offset is unset: a civil time on a
2699
+ # calendar day in a particular time zone. * When neither time_zone nor
2700
+ # utc_offset is set: a civil time on a calendar day in local time. The date is
2701
+ # relative to the Proleptic Gregorian Calendar. If year, month, or day are 0,
2702
+ # the DateTime is considered not to have a specific year, month, or day
2703
+ # respectively. This type may also be used to represent a physical time if all
2704
+ # the date and time fields are set and either case of the `time_offset` oneof is
2705
+ # set. Consider using `Timestamp` message for physical time instead. If your use
2706
+ # case also would like to store the user's timezone, that can be done in another
2707
+ # field. This type is more flexible than some applications may want. Make sure
2708
+ # to document and validate your application's limitations.
2709
+ # Corresponds to the JSON property `datetimeValue`
2710
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeDateTime]
2711
+ attr_accessor :datetime_value
2712
+
2713
+ # Float value.
2714
+ # Corresponds to the JSON property `floatValue`
2715
+ # @return [Float]
2716
+ attr_accessor :float_value
2717
+
2718
+ # Integer value.
2719
+ # Corresponds to the JSON property `integerValue`
2720
+ # @return [Fixnum]
2721
+ attr_accessor :integer_value
2722
+
2723
+ # Represents an amount of money with its currency type.
2724
+ # Corresponds to the JSON property `moneyValue`
2725
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeMoney]
2726
+ attr_accessor :money_value
2727
+
2728
+ # Optional. An optional field to store a normalized string. For some entity
2729
+ # types, one of respective `structured_value` fields may also be populated. Also
2730
+ # not all the types of `structured_value` will be normalized. For example, some
2731
+ # processors may not generate `float` or `integer` normalized text by default.
2732
+ # Below are sample formats mapped to structured values. - Money/Currency type (`
2733
+ # money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in
2734
+ # the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO
2735
+ # 8601 text format.
2736
+ # Corresponds to the JSON property `text`
2737
+ # @return [String]
2738
+ attr_accessor :text
2906
2739
 
2907
2740
  def initialize(**args)
2908
2741
  update!(**args)
@@ -2910,40 +2743,35 @@ module Google
2910
2743
 
2911
2744
  # Update properties of this object
2912
2745
  def update!(**args)
2913
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2914
- @layout = args[:layout] if args.key?(:layout)
2915
- @provenance = args[:provenance] if args.key?(:provenance)
2746
+ @address_value = args[:address_value] if args.key?(:address_value)
2747
+ @boolean_value = args[:boolean_value] if args.key?(:boolean_value)
2748
+ @date_value = args[:date_value] if args.key?(:date_value)
2749
+ @datetime_value = args[:datetime_value] if args.key?(:datetime_value)
2750
+ @float_value = args[:float_value] if args.key?(:float_value)
2751
+ @integer_value = args[:integer_value] if args.key?(:integer_value)
2752
+ @money_value = args[:money_value] if args.key?(:money_value)
2753
+ @text = args[:text] if args.key?(:text)
2916
2754
  end
2917
2755
  end
2918
2756
 
2919
- # Representation for transformation matrix, intended to be compatible and used
2920
- # with OpenCV format for image manipulation.
2921
- class GoogleCloudDocumentaiV1beta1DocumentPageMatrix
2757
+ # Relationship between Entities.
2758
+ class GoogleCloudDocumentaiV1beta1DocumentEntityRelation
2922
2759
  include Google::Apis::Core::Hashable
2923
2760
 
2924
- # Number of columns in the matrix.
2925
- # Corresponds to the JSON property `cols`
2926
- # @return [Fixnum]
2927
- attr_accessor :cols
2928
-
2929
- # The matrix data.
2930
- # Corresponds to the JSON property `data`
2931
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
2761
+ # Object entity id.
2762
+ # Corresponds to the JSON property `objectId`
2932
2763
  # @return [String]
2933
- attr_accessor :data
2764
+ attr_accessor :object_id_prop
2934
2765
 
2935
- # Number of rows in the matrix.
2936
- # Corresponds to the JSON property `rows`
2937
- # @return [Fixnum]
2938
- attr_accessor :rows
2766
+ # Relationship description.
2767
+ # Corresponds to the JSON property `relation`
2768
+ # @return [String]
2769
+ attr_accessor :relation
2939
2770
 
2940
- # This encodes information about what data type the matrix uses. For example, 0 (
2941
- # CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data
2942
- # types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/
2943
- # group__core__hal__interface.html
2944
- # Corresponds to the JSON property `type`
2945
- # @return [Fixnum]
2946
- attr_accessor :type
2771
+ # Subject entity id.
2772
+ # Corresponds to the JSON property `subjectId`
2773
+ # @return [String]
2774
+ attr_accessor :subject_id
2947
2775
 
2948
2776
  def initialize(**args)
2949
2777
  update!(**args)
@@ -2951,58 +2779,108 @@ module Google
2951
2779
 
2952
2780
  # Update properties of this object
2953
2781
  def update!(**args)
2954
- @cols = args[:cols] if args.key?(:cols)
2955
- @data = args[:data] if args.key?(:data)
2956
- @rows = args[:rows] if args.key?(:rows)
2957
- @type = args[:type] if args.key?(:type)
2782
+ @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop)
2783
+ @relation = args[:relation] if args.key?(:relation)
2784
+ @subject_id = args[:subject_id] if args.key?(:subject_id)
2958
2785
  end
2959
2786
  end
2960
2787
 
2961
- # A collection of lines that a human would perceive as a paragraph.
2962
- class GoogleCloudDocumentaiV1beta1DocumentPageParagraph
2788
+ # A page in a Document.
2789
+ class GoogleCloudDocumentaiV1beta1DocumentPage
2963
2790
  include Google::Apis::Core::Hashable
2964
2791
 
2792
+ # A list of visually detected text blocks on the page. A block has a set of
2793
+ # lines (collected into paragraphs) that have a common line-spacing and
2794
+ # orientation.
2795
+ # Corresponds to the JSON property `blocks`
2796
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageBlock>]
2797
+ attr_accessor :blocks
2798
+
2799
+ # A list of detected barcodes.
2800
+ # Corresponds to the JSON property `detectedBarcodes`
2801
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode>]
2802
+ attr_accessor :detected_barcodes
2803
+
2965
2804
  # A list of detected languages together with confidence.
2966
2805
  # Corresponds to the JSON property `detectedLanguages`
2967
2806
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
2968
2807
  attr_accessor :detected_languages
2969
2808
 
2809
+ # Dimension for the page.
2810
+ # Corresponds to the JSON property `dimension`
2811
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDimension]
2812
+ attr_accessor :dimension
2813
+
2814
+ # A list of visually detected form fields on the page.
2815
+ # Corresponds to the JSON property `formFields`
2816
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageFormField>]
2817
+ attr_accessor :form_fields
2818
+
2819
+ # Rendered image contents for this page.
2820
+ # Corresponds to the JSON property `image`
2821
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageImage]
2822
+ attr_accessor :image
2823
+
2824
+ # Image quality scores for the page image.
2825
+ # Corresponds to the JSON property `imageQualityScores`
2826
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores]
2827
+ attr_accessor :image_quality_scores
2828
+
2970
2829
  # Visual element describing a layout unit on a page.
2971
2830
  # Corresponds to the JSON property `layout`
2972
2831
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
2973
2832
  attr_accessor :layout
2974
2833
 
2834
+ # A list of visually detected text lines on the page. A collection of tokens
2835
+ # that a human would perceive as a line.
2836
+ # Corresponds to the JSON property `lines`
2837
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLine>]
2838
+ attr_accessor :lines
2839
+
2840
+ # 1-based index for current Page in a parent Document. Useful when a page is
2841
+ # taken out of a Document for individual processing.
2842
+ # Corresponds to the JSON property `pageNumber`
2843
+ # @return [Fixnum]
2844
+ attr_accessor :page_number
2845
+
2846
+ # A list of visually detected text paragraphs on the page. A collection of lines
2847
+ # that a human would perceive as a paragraph.
2848
+ # Corresponds to the JSON property `paragraphs`
2849
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageParagraph>]
2850
+ attr_accessor :paragraphs
2851
+
2975
2852
  # Structure to identify provenance relationships between annotations in
2976
2853
  # different revisions.
2977
2854
  # Corresponds to the JSON property `provenance`
2978
2855
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
2979
2856
  attr_accessor :provenance
2980
2857
 
2981
- def initialize(**args)
2982
- update!(**args)
2983
- end
2858
+ # A list of visually detected symbols on the page.
2859
+ # Corresponds to the JSON property `symbols`
2860
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageSymbol>]
2861
+ attr_accessor :symbols
2984
2862
 
2985
- # Update properties of this object
2986
- def update!(**args)
2987
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2988
- @layout = args[:layout] if args.key?(:layout)
2989
- @provenance = args[:provenance] if args.key?(:provenance)
2990
- end
2991
- end
2863
+ # A list of visually detected tables on the page.
2864
+ # Corresponds to the JSON property `tables`
2865
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTable>]
2866
+ attr_accessor :tables
2992
2867
 
2993
- # A detected symbol.
2994
- class GoogleCloudDocumentaiV1beta1DocumentPageSymbol
2995
- include Google::Apis::Core::Hashable
2868
+ # A list of visually detected tokens on the page.
2869
+ # Corresponds to the JSON property `tokens`
2870
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageToken>]
2871
+ attr_accessor :tokens
2996
2872
 
2997
- # A list of detected languages together with confidence.
2998
- # Corresponds to the JSON property `detectedLanguages`
2999
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3000
- attr_accessor :detected_languages
2873
+ # Transformation matrices that were applied to the original document image to
2874
+ # produce Page.image.
2875
+ # Corresponds to the JSON property `transforms`
2876
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageMatrix>]
2877
+ attr_accessor :transforms
3001
2878
 
3002
- # Visual element describing a layout unit on a page.
3003
- # Corresponds to the JSON property `layout`
3004
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3005
- attr_accessor :layout
2879
+ # A list of detected non-text visual elements e.g. checkbox, signature etc. on
2880
+ # the page.
2881
+ # Corresponds to the JSON property `visualElements`
2882
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageVisualElement>]
2883
+ attr_accessor :visual_elements
3006
2884
 
3007
2885
  def initialize(**args)
3008
2886
  update!(**args)
@@ -3010,30 +2888,103 @@ module Google
3010
2888
 
3011
2889
  # Update properties of this object
3012
2890
  def update!(**args)
2891
+ @blocks = args[:blocks] if args.key?(:blocks)
2892
+ @detected_barcodes = args[:detected_barcodes] if args.key?(:detected_barcodes)
3013
2893
  @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2894
+ @dimension = args[:dimension] if args.key?(:dimension)
2895
+ @form_fields = args[:form_fields] if args.key?(:form_fields)
2896
+ @image = args[:image] if args.key?(:image)
2897
+ @image_quality_scores = args[:image_quality_scores] if args.key?(:image_quality_scores)
3014
2898
  @layout = args[:layout] if args.key?(:layout)
2899
+ @lines = args[:lines] if args.key?(:lines)
2900
+ @page_number = args[:page_number] if args.key?(:page_number)
2901
+ @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
2902
+ @provenance = args[:provenance] if args.key?(:provenance)
2903
+ @symbols = args[:symbols] if args.key?(:symbols)
2904
+ @tables = args[:tables] if args.key?(:tables)
2905
+ @tokens = args[:tokens] if args.key?(:tokens)
2906
+ @transforms = args[:transforms] if args.key?(:transforms)
2907
+ @visual_elements = args[:visual_elements] if args.key?(:visual_elements)
3015
2908
  end
3016
2909
  end
3017
2910
 
3018
- # A table representation similar to HTML table structure.
3019
- class GoogleCloudDocumentaiV1beta1DocumentPageTable
2911
+ # Referencing the visual context of the entity in the Document.pages. Page
2912
+ # anchors can be cross-page, consist of multiple bounding polygons and
2913
+ # optionally reference specific layout element types.
2914
+ class GoogleCloudDocumentaiV1beta1DocumentPageAnchor
3020
2915
  include Google::Apis::Core::Hashable
3021
2916
 
3022
- # Body rows of the table.
3023
- # Corresponds to the JSON property `bodyRows`
3024
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow>]
3025
- attr_accessor :body_rows
2917
+ # One or more references to visual page elements
2918
+ # Corresponds to the JSON property `pageRefs`
2919
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef>]
2920
+ attr_accessor :page_refs
2921
+
2922
+ def initialize(**args)
2923
+ update!(**args)
2924
+ end
2925
+
2926
+ # Update properties of this object
2927
+ def update!(**args)
2928
+ @page_refs = args[:page_refs] if args.key?(:page_refs)
2929
+ end
2930
+ end
2931
+
2932
+ # Represents a weak reference to a page element within a document.
2933
+ class GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef
2934
+ include Google::Apis::Core::Hashable
2935
+
2936
+ # A bounding polygon for the detected image annotation.
2937
+ # Corresponds to the JSON property `boundingPoly`
2938
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
2939
+ attr_accessor :bounding_poly
2940
+
2941
+ # Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
2942
+ # Corresponds to the JSON property `confidence`
2943
+ # @return [Float]
2944
+ attr_accessor :confidence
2945
+
2946
+ # Optional. Deprecated. Use PageRef.bounding_poly instead.
2947
+ # Corresponds to the JSON property `layoutId`
2948
+ # @return [String]
2949
+ attr_accessor :layout_id
2950
+
2951
+ # Optional. The type of the layout element that is being referenced if any.
2952
+ # Corresponds to the JSON property `layoutType`
2953
+ # @return [String]
2954
+ attr_accessor :layout_type
2955
+
2956
+ # Required. Index into the Document.pages element, for example using `Document.
2957
+ # pages` to locate the related page element. This field is skipped when its
2958
+ # value is the default `0`. See https://developers.google.com/protocol-buffers/
2959
+ # docs/proto3#json.
2960
+ # Corresponds to the JSON property `page`
2961
+ # @return [Fixnum]
2962
+ attr_accessor :page
2963
+
2964
+ def initialize(**args)
2965
+ update!(**args)
2966
+ end
2967
+
2968
+ # Update properties of this object
2969
+ def update!(**args)
2970
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
2971
+ @confidence = args[:confidence] if args.key?(:confidence)
2972
+ @layout_id = args[:layout_id] if args.key?(:layout_id)
2973
+ @layout_type = args[:layout_type] if args.key?(:layout_type)
2974
+ @page = args[:page] if args.key?(:page)
2975
+ end
2976
+ end
2977
+
2978
+ # A block has a set of lines (collected into paragraphs) that have a common line-
2979
+ # spacing and orientation.
2980
+ class GoogleCloudDocumentaiV1beta1DocumentPageBlock
2981
+ include Google::Apis::Core::Hashable
3026
2982
 
3027
2983
  # A list of detected languages together with confidence.
3028
2984
  # Corresponds to the JSON property `detectedLanguages`
3029
2985
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3030
2986
  attr_accessor :detected_languages
3031
2987
 
3032
- # Header rows of the table.
3033
- # Corresponds to the JSON property `headerRows`
3034
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow>]
3035
- attr_accessor :header_rows
3036
-
3037
2988
  # Visual element describing a layout unit on a page.
3038
2989
  # Corresponds to the JSON property `layout`
3039
2990
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
@@ -3051,59 +3002,51 @@ module Google
3051
3002
 
3052
3003
  # Update properties of this object
3053
3004
  def update!(**args)
3054
- @body_rows = args[:body_rows] if args.key?(:body_rows)
3055
3005
  @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3056
- @header_rows = args[:header_rows] if args.key?(:header_rows)
3057
3006
  @layout = args[:layout] if args.key?(:layout)
3058
3007
  @provenance = args[:provenance] if args.key?(:provenance)
3059
3008
  end
3060
3009
  end
3061
3010
 
3062
- # A cell representation inside the table.
3063
- class GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell
3011
+ # A detected barcode.
3012
+ class GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode
3064
3013
  include Google::Apis::Core::Hashable
3065
3014
 
3066
- # How many columns this cell spans.
3067
- # Corresponds to the JSON property `colSpan`
3068
- # @return [Fixnum]
3069
- attr_accessor :col_span
3070
-
3071
- # A list of detected languages together with confidence.
3072
- # Corresponds to the JSON property `detectedLanguages`
3073
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3074
- attr_accessor :detected_languages
3015
+ # Encodes the detailed information of a barcode.
3016
+ # Corresponds to the JSON property `barcode`
3017
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1Barcode]
3018
+ attr_accessor :barcode
3075
3019
 
3076
3020
  # Visual element describing a layout unit on a page.
3077
3021
  # Corresponds to the JSON property `layout`
3078
3022
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3079
3023
  attr_accessor :layout
3080
3024
 
3081
- # How many rows this cell spans.
3082
- # Corresponds to the JSON property `rowSpan`
3083
- # @return [Fixnum]
3084
- attr_accessor :row_span
3085
-
3086
3025
  def initialize(**args)
3087
3026
  update!(**args)
3088
3027
  end
3089
3028
 
3090
3029
  # Update properties of this object
3091
3030
  def update!(**args)
3092
- @col_span = args[:col_span] if args.key?(:col_span)
3093
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3031
+ @barcode = args[:barcode] if args.key?(:barcode)
3094
3032
  @layout = args[:layout] if args.key?(:layout)
3095
- @row_span = args[:row_span] if args.key?(:row_span)
3096
3033
  end
3097
3034
  end
3098
3035
 
3099
- # A row of table cells.
3100
- class GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow
3036
+ # Detected language for a structural component.
3037
+ class GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage
3101
3038
  include Google::Apis::Core::Hashable
3102
3039
 
3103
- # Cells that make up this row.
3104
- # Corresponds to the JSON property `cells`
3105
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell>]
3106
- attr_accessor :cells
3040
+ # Confidence of detected language. Range `[0, 1]`.
3041
+ # Corresponds to the JSON property `confidence`
3042
+ # @return [Float]
3043
+ attr_accessor :confidence
3044
+
3045
+ # The [BCP-47 language code](https://www.unicode.org/reports/tr35/#
3046
+ # Unicode_locale_identifier), such as `en-US` or `sr-Latn`.
3047
+ # Corresponds to the JSON property `languageCode`
3048
+ # @return [String]
3049
+ attr_accessor :language_code
3107
3050
 
3108
3051
  def initialize(**args)
3109
3052
  update!(**args)
@@ -3111,28 +3054,74 @@ module Google
3111
3054
 
3112
3055
  # Update properties of this object
3113
3056
  def update!(**args)
3114
- @cells = args[:cells] if args.key?(:cells)
3057
+ @confidence = args[:confidence] if args.key?(:confidence)
3058
+ @language_code = args[:language_code] if args.key?(:language_code)
3115
3059
  end
3116
3060
  end
3117
3061
 
3118
- # A detected token.
3119
- class GoogleCloudDocumentaiV1beta1DocumentPageToken
3062
+ # Dimension for the page.
3063
+ class GoogleCloudDocumentaiV1beta1DocumentPageDimension
3120
3064
  include Google::Apis::Core::Hashable
3121
3065
 
3122
- # Detected break at the end of a Token.
3123
- # Corresponds to the JSON property `detectedBreak`
3124
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak]
3125
- attr_accessor :detected_break
3066
+ # Page height.
3067
+ # Corresponds to the JSON property `height`
3068
+ # @return [Float]
3069
+ attr_accessor :height
3126
3070
 
3127
- # A list of detected languages together with confidence.
3128
- # Corresponds to the JSON property `detectedLanguages`
3129
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3130
- attr_accessor :detected_languages
3071
+ # Dimension unit.
3072
+ # Corresponds to the JSON property `unit`
3073
+ # @return [String]
3074
+ attr_accessor :unit
3075
+
3076
+ # Page width.
3077
+ # Corresponds to the JSON property `width`
3078
+ # @return [Float]
3079
+ attr_accessor :width
3080
+
3081
+ def initialize(**args)
3082
+ update!(**args)
3083
+ end
3084
+
3085
+ # Update properties of this object
3086
+ def update!(**args)
3087
+ @height = args[:height] if args.key?(:height)
3088
+ @unit = args[:unit] if args.key?(:unit)
3089
+ @width = args[:width] if args.key?(:width)
3090
+ end
3091
+ end
3092
+
3093
+ # A form field detected on the page.
3094
+ class GoogleCloudDocumentaiV1beta1DocumentPageFormField
3095
+ include Google::Apis::Core::Hashable
3096
+
3097
+ # Created for Labeling UI to export key text. If corrections were made to the
3098
+ # text identified by the `field_name.text_anchor`, this field will contain the
3099
+ # correction.
3100
+ # Corresponds to the JSON property `correctedKeyText`
3101
+ # @return [String]
3102
+ attr_accessor :corrected_key_text
3103
+
3104
+ # Created for Labeling UI to export value text. If corrections were made to the
3105
+ # text identified by the `field_value.text_anchor`, this field will contain the
3106
+ # correction.
3107
+ # Corresponds to the JSON property `correctedValueText`
3108
+ # @return [String]
3109
+ attr_accessor :corrected_value_text
3131
3110
 
3132
3111
  # Visual element describing a layout unit on a page.
3133
- # Corresponds to the JSON property `layout`
3112
+ # Corresponds to the JSON property `fieldName`
3134
3113
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3135
- attr_accessor :layout
3114
+ attr_accessor :field_name
3115
+
3116
+ # Visual element describing a layout unit on a page.
3117
+ # Corresponds to the JSON property `fieldValue`
3118
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3119
+ attr_accessor :field_value
3120
+
3121
+ # A list of detected languages for name together with confidence.
3122
+ # Corresponds to the JSON property `nameDetectedLanguages`
3123
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3124
+ attr_accessor :name_detected_languages
3136
3125
 
3137
3126
  # Structure to identify provenance relationships between annotations in
3138
3127
  # different revisions.
@@ -3140,10 +3129,17 @@ module Google
3140
3129
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
3141
3130
  attr_accessor :provenance
3142
3131
 
3143
- # Font and other text style attributes.
3144
- # Corresponds to the JSON property `styleInfo`
3145
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo]
3146
- attr_accessor :style_info
3132
+ # A list of detected languages for value together with confidence.
3133
+ # Corresponds to the JSON property `valueDetectedLanguages`
3134
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3135
+ attr_accessor :value_detected_languages
3136
+
3137
+ # If the value is non-textual, this field represents the type. Current valid
3138
+ # values are: - blank (this indicates the `field_value` is normal text) - `
3139
+ # unfilled_checkbox` - `filled_checkbox`
3140
+ # Corresponds to the JSON property `valueType`
3141
+ # @return [String]
3142
+ attr_accessor :value_type
3147
3143
 
3148
3144
  def initialize(**args)
3149
3145
  update!(**args)
@@ -3151,22 +3147,42 @@ module Google
3151
3147
 
3152
3148
  # Update properties of this object
3153
3149
  def update!(**args)
3154
- @detected_break = args[:detected_break] if args.key?(:detected_break)
3155
- @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3156
- @layout = args[:layout] if args.key?(:layout)
3150
+ @corrected_key_text = args[:corrected_key_text] if args.key?(:corrected_key_text)
3151
+ @corrected_value_text = args[:corrected_value_text] if args.key?(:corrected_value_text)
3152
+ @field_name = args[:field_name] if args.key?(:field_name)
3153
+ @field_value = args[:field_value] if args.key?(:field_value)
3154
+ @name_detected_languages = args[:name_detected_languages] if args.key?(:name_detected_languages)
3157
3155
  @provenance = args[:provenance] if args.key?(:provenance)
3158
- @style_info = args[:style_info] if args.key?(:style_info)
3156
+ @value_detected_languages = args[:value_detected_languages] if args.key?(:value_detected_languages)
3157
+ @value_type = args[:value_type] if args.key?(:value_type)
3159
3158
  end
3160
3159
  end
3161
3160
 
3162
- # Detected break at the end of a Token.
3163
- class GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak
3161
+ # Rendered image contents for this page.
3162
+ class GoogleCloudDocumentaiV1beta1DocumentPageImage
3164
3163
  include Google::Apis::Core::Hashable
3165
3164
 
3166
- # Detected break type.
3167
- # Corresponds to the JSON property `type`
3165
+ # Raw byte content of the image.
3166
+ # Corresponds to the JSON property `content`
3167
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
3168
3168
  # @return [String]
3169
- attr_accessor :type
3169
+ attr_accessor :content
3170
+
3171
+ # Height of the image in pixels.
3172
+ # Corresponds to the JSON property `height`
3173
+ # @return [Fixnum]
3174
+ attr_accessor :height
3175
+
3176
+ # Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/
3177
+ # media-types.xhtml) for the image.
3178
+ # Corresponds to the JSON property `mimeType`
3179
+ # @return [String]
3180
+ attr_accessor :mime_type
3181
+
3182
+ # Width of the image in pixels.
3183
+ # Corresponds to the JSON property `width`
3184
+ # @return [Fixnum]
3185
+ attr_accessor :width
3170
3186
 
3171
3187
  def initialize(**args)
3172
3188
  update!(**args)
@@ -3174,185 +3190,92 @@ module Google
3174
3190
 
3175
3191
  # Update properties of this object
3176
3192
  def update!(**args)
3177
- @type = args[:type] if args.key?(:type)
3193
+ @content = args[:content] if args.key?(:content)
3194
+ @height = args[:height] if args.key?(:height)
3195
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
3196
+ @width = args[:width] if args.key?(:width)
3178
3197
  end
3179
3198
  end
3180
3199
 
3181
- # Font and other text style attributes.
3182
- class GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo
3200
+ # Image quality scores for the page image.
3201
+ class GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores
3183
3202
  include Google::Apis::Core::Hashable
3184
3203
 
3185
- # Represents a color in the RGBA color space. This representation is designed
3186
- # for simplicity of conversion to and from color representations in various
3187
- # languages over compactness. For example, the fields of this representation can
3188
- # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3189
- # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3190
- # method in iOS; and, with just a little work, it can be easily formatted into a
3191
- # CSS `rgba()` string in JavaScript. This reference page doesn't have
3192
- # information about the absolute color space that should be used to interpret
3193
- # the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
3194
- # applications should assume the sRGB color space. When color equality needs to
3195
- # be decided, implementations, unless documented otherwise, treat two colors as
3196
- # equal if all their red, green, blue, and alpha values each differ by at most `
3197
- # 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
3198
- # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3199
- # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3200
- # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3201
- # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3202
- # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3203
- # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3204
- # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3205
- # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3206
- # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3207
- # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3208
- # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3209
- # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3210
- # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3211
- # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3212
- # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3213
- # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3214
- # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3215
- # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3216
- # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3217
- # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3218
- # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3219
- # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3220
- # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3221
- # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3222
- # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3223
- # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3224
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3225
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3226
- # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3227
- # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3228
- # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3229
- # / ...
3230
- # Corresponds to the JSON property `backgroundColor`
3231
- # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3232
- attr_accessor :background_color
3233
-
3234
- # Whether the text is bold (equivalent to font_weight is at least `700`).
3235
- # Corresponds to the JSON property `bold`
3236
- # @return [Boolean]
3237
- attr_accessor :bold
3238
- alias_method :bold?, :bold
3239
-
3240
- # Font size in points (`1` point is `¹⁄₇₂` inches).
3241
- # Corresponds to the JSON property `fontSize`
3242
- # @return [Fixnum]
3243
- attr_accessor :font_size
3204
+ # A list of detected defects.
3205
+ # Corresponds to the JSON property `detectedDefects`
3206
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect>]
3207
+ attr_accessor :detected_defects
3244
3208
 
3245
- # Name or style of the font.
3246
- # Corresponds to the JSON property `fontType`
3247
- # @return [String]
3248
- attr_accessor :font_type
3209
+ # The overall quality score. Range `[0, 1]` where `1` is perfect quality.
3210
+ # Corresponds to the JSON property `qualityScore`
3211
+ # @return [Float]
3212
+ attr_accessor :quality_score
3249
3213
 
3250
- # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `
3251
- # 400`, bold is `700`.
3252
- # Corresponds to the JSON property `fontWeight`
3253
- # @return [Fixnum]
3254
- attr_accessor :font_weight
3214
+ def initialize(**args)
3215
+ update!(**args)
3216
+ end
3255
3217
 
3256
- # Whether the text is handwritten.
3257
- # Corresponds to the JSON property `handwritten`
3258
- # @return [Boolean]
3259
- attr_accessor :handwritten
3260
- alias_method :handwritten?, :handwritten
3218
+ # Update properties of this object
3219
+ def update!(**args)
3220
+ @detected_defects = args[:detected_defects] if args.key?(:detected_defects)
3221
+ @quality_score = args[:quality_score] if args.key?(:quality_score)
3222
+ end
3223
+ end
3261
3224
 
3262
- # Whether the text is italic.
3263
- # Corresponds to the JSON property `italic`
3264
- # @return [Boolean]
3265
- attr_accessor :italic
3266
- alias_method :italic?, :italic
3225
+ # Image Quality Defects
3226
+ class GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect
3227
+ include Google::Apis::Core::Hashable
3267
3228
 
3268
- # Letter spacing in points.
3269
- # Corresponds to the JSON property `letterSpacing`
3229
+ # Confidence of detected defect. Range `[0, 1]` where `1` indicates strong
3230
+ # confidence that the defect exists.
3231
+ # Corresponds to the JSON property `confidence`
3270
3232
  # @return [Float]
3271
- attr_accessor :letter_spacing
3233
+ attr_accessor :confidence
3272
3234
 
3273
- # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
3274
- # Corresponds to the JSON property `pixelFontSize`
3275
- # @return [Float]
3276
- attr_accessor :pixel_font_size
3235
+ # Name of the defect type. Supported values are: - `quality/defect_blurry` - `
3236
+ # quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `
3237
+ # quality/defect_text_too_small` - `quality/defect_document_cutoff` - `quality/
3238
+ # defect_text_cutoff` - `quality/defect_glare`
3239
+ # Corresponds to the JSON property `type`
3240
+ # @return [String]
3241
+ attr_accessor :type
3277
3242
 
3278
- # Whether the text is in small caps. This feature is not supported yet.
3279
- # Corresponds to the JSON property `smallcaps`
3280
- # @return [Boolean]
3281
- attr_accessor :smallcaps
3282
- alias_method :smallcaps?, :smallcaps
3243
+ def initialize(**args)
3244
+ update!(**args)
3245
+ end
3283
3246
 
3284
- # Whether the text is strikethrough. This feature is not supported yet.
3285
- # Corresponds to the JSON property `strikeout`
3286
- # @return [Boolean]
3287
- attr_accessor :strikeout
3288
- alias_method :strikeout?, :strikeout
3247
+ # Update properties of this object
3248
+ def update!(**args)
3249
+ @confidence = args[:confidence] if args.key?(:confidence)
3250
+ @type = args[:type] if args.key?(:type)
3251
+ end
3252
+ end
3289
3253
 
3290
- # Whether the text is a subscript. This feature is not supported yet.
3291
- # Corresponds to the JSON property `subscript`
3292
- # @return [Boolean]
3293
- attr_accessor :subscript
3294
- alias_method :subscript?, :subscript
3254
+ # Visual element describing a layout unit on a page.
3255
+ class GoogleCloudDocumentaiV1beta1DocumentPageLayout
3256
+ include Google::Apis::Core::Hashable
3295
3257
 
3296
- # Whether the text is a superscript. This feature is not supported yet.
3297
- # Corresponds to the JSON property `superscript`
3298
- # @return [Boolean]
3299
- attr_accessor :superscript
3300
- alias_method :superscript?, :superscript
3258
+ # A bounding polygon for the detected image annotation.
3259
+ # Corresponds to the JSON property `boundingPoly`
3260
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1BoundingPoly]
3261
+ attr_accessor :bounding_poly
3301
3262
 
3302
- # Represents a color in the RGBA color space. This representation is designed
3303
- # for simplicity of conversion to and from color representations in various
3304
- # languages over compactness. For example, the fields of this representation can
3305
- # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3306
- # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3307
- # method in iOS; and, with just a little work, it can be easily formatted into a
3308
- # CSS `rgba()` string in JavaScript. This reference page doesn't have
3309
- # information about the absolute color space that should be used to interpret
3310
- # the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
3311
- # applications should assume the sRGB color space. When color equality needs to
3312
- # be decided, implementations, unless documented otherwise, treat two colors as
3313
- # equal if all their red, green, blue, and alpha values each differ by at most `
3314
- # 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
3315
- # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
3316
- # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
3317
- # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
3318
- # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
3319
- # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
3320
- # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
3321
- # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
3322
- # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
3323
- # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
3324
- # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
3325
- # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
3326
- # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
3327
- # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
3328
- # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
3329
- # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
3330
- # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
3331
- # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
3332
- # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
3333
- # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
3334
- # autorelease]; return result; ` // ... Example (JavaScript): // ... var
3335
- # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
3336
- # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
3337
- # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
3338
- # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
3339
- # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
3340
- # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
3341
- # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
3342
- # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
3343
- # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
3344
- # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3345
- # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3346
- # / ...
3347
- # Corresponds to the JSON property `textColor`
3348
- # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3349
- attr_accessor :text_color
3263
+ # Confidence of the current Layout within context of the object this layout is
3264
+ # for. e.g. confidence can be for a single token, a table, a visual element, etc.
3265
+ # depending on context. Range `[0, 1]`.
3266
+ # Corresponds to the JSON property `confidence`
3267
+ # @return [Float]
3268
+ attr_accessor :confidence
3350
3269
 
3351
- # Whether the text is underlined.
3352
- # Corresponds to the JSON property `underlined`
3353
- # @return [Boolean]
3354
- attr_accessor :underlined
3355
- alias_method :underlined?, :underlined
3270
+ # Detected orientation for the Layout.
3271
+ # Corresponds to the JSON property `orientation`
3272
+ # @return [String]
3273
+ attr_accessor :orientation
3274
+
3275
+ # Text reference indexing into the Document.text.
3276
+ # Corresponds to the JSON property `textAnchor`
3277
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
3278
+ attr_accessor :text_anchor
3356
3279
 
3357
3280
  def initialize(**args)
3358
3281
  update!(**args)
@@ -3360,26 +3283,16 @@ module Google
3360
3283
 
3361
3284
  # Update properties of this object
3362
3285
  def update!(**args)
3363
- @background_color = args[:background_color] if args.key?(:background_color)
3364
- @bold = args[:bold] if args.key?(:bold)
3365
- @font_size = args[:font_size] if args.key?(:font_size)
3366
- @font_type = args[:font_type] if args.key?(:font_type)
3367
- @font_weight = args[:font_weight] if args.key?(:font_weight)
3368
- @handwritten = args[:handwritten] if args.key?(:handwritten)
3369
- @italic = args[:italic] if args.key?(:italic)
3370
- @letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
3371
- @pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
3372
- @smallcaps = args[:smallcaps] if args.key?(:smallcaps)
3373
- @strikeout = args[:strikeout] if args.key?(:strikeout)
3374
- @subscript = args[:subscript] if args.key?(:subscript)
3375
- @superscript = args[:superscript] if args.key?(:superscript)
3376
- @text_color = args[:text_color] if args.key?(:text_color)
3377
- @underlined = args[:underlined] if args.key?(:underlined)
3286
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
3287
+ @confidence = args[:confidence] if args.key?(:confidence)
3288
+ @orientation = args[:orientation] if args.key?(:orientation)
3289
+ @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
3378
3290
  end
3379
3291
  end
3380
3292
 
3381
- # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
3382
- class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement
3293
+ # A collection of tokens that a human would perceive as a line. Does not cross
3294
+ # column boundaries, can be horizontal, vertical, etc.
3295
+ class GoogleCloudDocumentaiV1beta1DocumentPageLine
3383
3296
  include Google::Apis::Core::Hashable
3384
3297
 
3385
3298
  # A list of detected languages together with confidence.
@@ -3392,46 +3305,51 @@ module Google
3392
3305
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3393
3306
  attr_accessor :layout
3394
3307
 
3395
- # Type of the VisualElement.
3396
- # Corresponds to the JSON property `type`
3397
- # @return [String]
3398
- attr_accessor :type
3399
-
3400
- def initialize(**args)
3401
- update!(**args)
3402
- end
3308
+ # Structure to identify provenance relationships between annotations in
3309
+ # different revisions.
3310
+ # Corresponds to the JSON property `provenance`
3311
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
3312
+ attr_accessor :provenance
3313
+
3314
+ def initialize(**args)
3315
+ update!(**args)
3316
+ end
3403
3317
 
3404
3318
  # Update properties of this object
3405
3319
  def update!(**args)
3406
3320
  @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3407
3321
  @layout = args[:layout] if args.key?(:layout)
3408
- @type = args[:type] if args.key?(:type)
3322
+ @provenance = args[:provenance] if args.key?(:provenance)
3409
3323
  end
3410
3324
  end
3411
3325
 
3412
- # Structure to identify provenance relationships between annotations in
3413
- # different revisions.
3414
- class GoogleCloudDocumentaiV1beta1DocumentProvenance
3326
+ # Representation for transformation matrix, intended to be compatible and used
3327
+ # with OpenCV format for image manipulation.
3328
+ class GoogleCloudDocumentaiV1beta1DocumentPageMatrix
3415
3329
  include Google::Apis::Core::Hashable
3416
3330
 
3417
- # The Id of this operation. Needs to be unique within the scope of the revision.
3418
- # Corresponds to the JSON property `id`
3331
+ # Number of columns in the matrix.
3332
+ # Corresponds to the JSON property `cols`
3419
3333
  # @return [Fixnum]
3420
- attr_accessor :id
3334
+ attr_accessor :cols
3421
3335
 
3422
- # References to the original elements that are replaced.
3423
- # Corresponds to the JSON property `parents`
3424
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenanceParent>]
3425
- attr_accessor :parents
3336
+ # The matrix data.
3337
+ # Corresponds to the JSON property `data`
3338
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
3339
+ # @return [String]
3340
+ attr_accessor :data
3426
3341
 
3427
- # The index of the revision that produced this element.
3428
- # Corresponds to the JSON property `revision`
3342
+ # Number of rows in the matrix.
3343
+ # Corresponds to the JSON property `rows`
3429
3344
  # @return [Fixnum]
3430
- attr_accessor :revision
3345
+ attr_accessor :rows
3431
3346
 
3432
- # The type of provenance operation.
3347
+ # This encodes information about what data type the matrix uses. For example, 0 (
3348
+ # CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data
3349
+ # types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/
3350
+ # group__core__hal__interface.html
3433
3351
  # Corresponds to the JSON property `type`
3434
- # @return [String]
3352
+ # @return [Fixnum]
3435
3353
  attr_accessor :type
3436
3354
 
3437
3355
  def initialize(**args)
@@ -3440,33 +3358,32 @@ module Google
3440
3358
 
3441
3359
  # Update properties of this object
3442
3360
  def update!(**args)
3443
- @id = args[:id] if args.key?(:id)
3444
- @parents = args[:parents] if args.key?(:parents)
3445
- @revision = args[:revision] if args.key?(:revision)
3361
+ @cols = args[:cols] if args.key?(:cols)
3362
+ @data = args[:data] if args.key?(:data)
3363
+ @rows = args[:rows] if args.key?(:rows)
3446
3364
  @type = args[:type] if args.key?(:type)
3447
3365
  end
3448
3366
  end
3449
3367
 
3450
- # The parent element the current element is based on. Used for referencing/
3451
- # aligning, removal and replacement operations.
3452
- class GoogleCloudDocumentaiV1beta1DocumentProvenanceParent
3368
+ # A collection of lines that a human would perceive as a paragraph.
3369
+ class GoogleCloudDocumentaiV1beta1DocumentPageParagraph
3453
3370
  include Google::Apis::Core::Hashable
3454
3371
 
3455
- # The id of the parent provenance.
3456
- # Corresponds to the JSON property `id`
3457
- # @return [Fixnum]
3458
- attr_accessor :id
3372
+ # A list of detected languages together with confidence.
3373
+ # Corresponds to the JSON property `detectedLanguages`
3374
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3375
+ attr_accessor :detected_languages
3459
3376
 
3460
- # The index of the parent item in the corresponding item list (eg. list of
3461
- # entities, properties within entities, etc.) in the parent revision.
3462
- # Corresponds to the JSON property `index`
3463
- # @return [Fixnum]
3464
- attr_accessor :index
3377
+ # Visual element describing a layout unit on a page.
3378
+ # Corresponds to the JSON property `layout`
3379
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3380
+ attr_accessor :layout
3465
3381
 
3466
- # The index of the index into current revision's parent_ids list.
3467
- # Corresponds to the JSON property `revision`
3468
- # @return [Fixnum]
3469
- attr_accessor :revision
3382
+ # Structure to identify provenance relationships between annotations in
3383
+ # different revisions.
3384
+ # Corresponds to the JSON property `provenance`
3385
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
3386
+ attr_accessor :provenance
3470
3387
 
3471
3388
  def initialize(**args)
3472
3389
  update!(**args)
@@ -3474,57 +3391,66 @@ module Google
3474
3391
 
3475
3392
  # Update properties of this object
3476
3393
  def update!(**args)
3477
- @id = args[:id] if args.key?(:id)
3478
- @index = args[:index] if args.key?(:index)
3479
- @revision = args[:revision] if args.key?(:revision)
3394
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3395
+ @layout = args[:layout] if args.key?(:layout)
3396
+ @provenance = args[:provenance] if args.key?(:provenance)
3480
3397
  end
3481
3398
  end
3482
3399
 
3483
- # Contains past or forward revisions of this document.
3484
- class GoogleCloudDocumentaiV1beta1DocumentRevision
3400
+ # A detected symbol.
3401
+ class GoogleCloudDocumentaiV1beta1DocumentPageSymbol
3485
3402
  include Google::Apis::Core::Hashable
3486
3403
 
3487
- # If the change was made by a person specify the name or id of that person.
3488
- # Corresponds to the JSON property `agent`
3489
- # @return [String]
3490
- attr_accessor :agent
3404
+ # A list of detected languages together with confidence.
3405
+ # Corresponds to the JSON property `detectedLanguages`
3406
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3407
+ attr_accessor :detected_languages
3491
3408
 
3492
- # The time that the revision was created, internally generated by doc proto
3493
- # storage at the time of create.
3494
- # Corresponds to the JSON property `createTime`
3495
- # @return [String]
3496
- attr_accessor :create_time
3409
+ # Visual element describing a layout unit on a page.
3410
+ # Corresponds to the JSON property `layout`
3411
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3412
+ attr_accessor :layout
3497
3413
 
3498
- # Human Review information of the document.
3499
- # Corresponds to the JSON property `humanReview`
3500
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview]
3501
- attr_accessor :human_review
3414
+ def initialize(**args)
3415
+ update!(**args)
3416
+ end
3502
3417
 
3503
- # Id of the revision, internally generated by doc proto storage. Unique within
3504
- # the context of the document.
3505
- # Corresponds to the JSON property `id`
3506
- # @return [String]
3507
- attr_accessor :id
3418
+ # Update properties of this object
3419
+ def update!(**args)
3420
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3421
+ @layout = args[:layout] if args.key?(:layout)
3422
+ end
3423
+ end
3508
3424
 
3509
- # The revisions that this revision is based on. This can include one or more
3510
- # parent (when documents are merged.) This field represents the index into the `
3511
- # revisions` field.
3512
- # Corresponds to the JSON property `parent`
3513
- # @return [Array<Fixnum>]
3514
- attr_accessor :parent
3425
+ # A table representation similar to HTML table structure.
3426
+ class GoogleCloudDocumentaiV1beta1DocumentPageTable
3427
+ include Google::Apis::Core::Hashable
3515
3428
 
3516
- # The revisions that this revision is based on. Must include all the ids that
3517
- # have anything to do with this revision - eg. there are `provenance.parent.
3518
- # revision` fields that index into this field.
3519
- # Corresponds to the JSON property `parentIds`
3520
- # @return [Array<String>]
3521
- attr_accessor :parent_ids
3429
+ # Body rows of the table.
3430
+ # Corresponds to the JSON property `bodyRows`
3431
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow>]
3432
+ attr_accessor :body_rows
3522
3433
 
3523
- # If the annotation was made by processor identify the processor by its resource
3524
- # name.
3525
- # Corresponds to the JSON property `processor`
3526
- # @return [String]
3527
- attr_accessor :processor
3434
+ # A list of detected languages together with confidence.
3435
+ # Corresponds to the JSON property `detectedLanguages`
3436
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3437
+ attr_accessor :detected_languages
3438
+
3439
+ # Header rows of the table.
3440
+ # Corresponds to the JSON property `headerRows`
3441
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow>]
3442
+ attr_accessor :header_rows
3443
+
3444
+ # Visual element describing a layout unit on a page.
3445
+ # Corresponds to the JSON property `layout`
3446
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3447
+ attr_accessor :layout
3448
+
3449
+ # Structure to identify provenance relationships between annotations in
3450
+ # different revisions.
3451
+ # Corresponds to the JSON property `provenance`
3452
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
3453
+ attr_accessor :provenance
3528
3454
 
3529
3455
  def initialize(**args)
3530
3456
  update!(**args)
@@ -3532,30 +3458,37 @@ module Google
3532
3458
 
3533
3459
  # Update properties of this object
3534
3460
  def update!(**args)
3535
- @agent = args[:agent] if args.key?(:agent)
3536
- @create_time = args[:create_time] if args.key?(:create_time)
3537
- @human_review = args[:human_review] if args.key?(:human_review)
3538
- @id = args[:id] if args.key?(:id)
3539
- @parent = args[:parent] if args.key?(:parent)
3540
- @parent_ids = args[:parent_ids] if args.key?(:parent_ids)
3541
- @processor = args[:processor] if args.key?(:processor)
3461
+ @body_rows = args[:body_rows] if args.key?(:body_rows)
3462
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3463
+ @header_rows = args[:header_rows] if args.key?(:header_rows)
3464
+ @layout = args[:layout] if args.key?(:layout)
3465
+ @provenance = args[:provenance] if args.key?(:provenance)
3542
3466
  end
3543
3467
  end
3544
3468
 
3545
- # Human Review information of the document.
3546
- class GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview
3469
+ # A cell representation inside the table.
3470
+ class GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell
3547
3471
  include Google::Apis::Core::Hashable
3548
3472
 
3549
- # Human review state. e.g. `requested`, `succeeded`, `rejected`.
3550
- # Corresponds to the JSON property `state`
3551
- # @return [String]
3552
- attr_accessor :state
3473
+ # How many columns this cell spans.
3474
+ # Corresponds to the JSON property `colSpan`
3475
+ # @return [Fixnum]
3476
+ attr_accessor :col_span
3553
3477
 
3554
- # A message providing more details about the current state of processing. For
3555
- # example, the rejection reason when the state is `rejected`.
3556
- # Corresponds to the JSON property `stateMessage`
3557
- # @return [String]
3558
- attr_accessor :state_message
3478
+ # A list of detected languages together with confidence.
3479
+ # Corresponds to the JSON property `detectedLanguages`
3480
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3481
+ attr_accessor :detected_languages
3482
+
3483
+ # Visual element describing a layout unit on a page.
3484
+ # Corresponds to the JSON property `layout`
3485
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3486
+ attr_accessor :layout
3487
+
3488
+ # How many rows this cell spans.
3489
+ # Corresponds to the JSON property `rowSpan`
3490
+ # @return [Fixnum]
3491
+ attr_accessor :row_span
3559
3492
 
3560
3493
  def initialize(**args)
3561
3494
  update!(**args)
@@ -3563,31 +3496,21 @@ module Google
3563
3496
 
3564
3497
  # Update properties of this object
3565
3498
  def update!(**args)
3566
- @state = args[:state] if args.key?(:state)
3567
- @state_message = args[:state_message] if args.key?(:state_message)
3499
+ @col_span = args[:col_span] if args.key?(:col_span)
3500
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3501
+ @layout = args[:layout] if args.key?(:layout)
3502
+ @row_span = args[:row_span] if args.key?(:row_span)
3568
3503
  end
3569
3504
  end
3570
3505
 
3571
- # For a large document, sharding may be performed to produce several document
3572
- # shards. Each document shard contains this field to detail which shard it is.
3573
- class GoogleCloudDocumentaiV1beta1DocumentShardInfo
3506
+ # A row of table cells.
3507
+ class GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow
3574
3508
  include Google::Apis::Core::Hashable
3575
3509
 
3576
- # Total number of shards.
3577
- # Corresponds to the JSON property `shardCount`
3578
- # @return [Fixnum]
3579
- attr_accessor :shard_count
3580
-
3581
- # The 0-based index of this shard.
3582
- # Corresponds to the JSON property `shardIndex`
3583
- # @return [Fixnum]
3584
- attr_accessor :shard_index
3585
-
3586
- # The index of the first character in Document.text in the overall document
3587
- # global text.
3588
- # Corresponds to the JSON property `textOffset`
3589
- # @return [Fixnum]
3590
- attr_accessor :text_offset
3510
+ # Cells that make up this row.
3511
+ # Corresponds to the JSON property `cells`
3512
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell>]
3513
+ attr_accessor :cells
3591
3514
 
3592
3515
  def initialize(**args)
3593
3516
  update!(**args)
@@ -3595,20 +3518,80 @@ module Google
3595
3518
 
3596
3519
  # Update properties of this object
3597
3520
  def update!(**args)
3598
- @shard_count = args[:shard_count] if args.key?(:shard_count)
3599
- @shard_index = args[:shard_index] if args.key?(:shard_index)
3600
- @text_offset = args[:text_offset] if args.key?(:text_offset)
3521
+ @cells = args[:cells] if args.key?(:cells)
3601
3522
  end
3602
3523
  end
3603
3524
 
3604
- # Annotation for common text style attributes. This adheres to CSS conventions
3605
- # as much as possible.
3606
- class GoogleCloudDocumentaiV1beta1DocumentStyle
3525
+ # A detected token.
3526
+ class GoogleCloudDocumentaiV1beta1DocumentPageToken
3607
3527
  include Google::Apis::Core::Hashable
3608
3528
 
3609
- # Represents a color in the RGBA color space. This representation is designed
3610
- # for simplicity of conversion to and from color representations in various
3611
- # languages over compactness. For example, the fields of this representation can
3529
+ # Detected break at the end of a Token.
3530
+ # Corresponds to the JSON property `detectedBreak`
3531
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak]
3532
+ attr_accessor :detected_break
3533
+
3534
+ # A list of detected languages together with confidence.
3535
+ # Corresponds to the JSON property `detectedLanguages`
3536
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3537
+ attr_accessor :detected_languages
3538
+
3539
+ # Visual element describing a layout unit on a page.
3540
+ # Corresponds to the JSON property `layout`
3541
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3542
+ attr_accessor :layout
3543
+
3544
+ # Structure to identify provenance relationships between annotations in
3545
+ # different revisions.
3546
+ # Corresponds to the JSON property `provenance`
3547
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance]
3548
+ attr_accessor :provenance
3549
+
3550
+ # Font and other text style attributes.
3551
+ # Corresponds to the JSON property `styleInfo`
3552
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo]
3553
+ attr_accessor :style_info
3554
+
3555
+ def initialize(**args)
3556
+ update!(**args)
3557
+ end
3558
+
3559
+ # Update properties of this object
3560
+ def update!(**args)
3561
+ @detected_break = args[:detected_break] if args.key?(:detected_break)
3562
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3563
+ @layout = args[:layout] if args.key?(:layout)
3564
+ @provenance = args[:provenance] if args.key?(:provenance)
3565
+ @style_info = args[:style_info] if args.key?(:style_info)
3566
+ end
3567
+ end
3568
+
3569
+ # Detected break at the end of a Token.
3570
+ class GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak
3571
+ include Google::Apis::Core::Hashable
3572
+
3573
+ # Detected break type.
3574
+ # Corresponds to the JSON property `type`
3575
+ # @return [String]
3576
+ attr_accessor :type
3577
+
3578
+ def initialize(**args)
3579
+ update!(**args)
3580
+ end
3581
+
3582
+ # Update properties of this object
3583
+ def update!(**args)
3584
+ @type = args[:type] if args.key?(:type)
3585
+ end
3586
+ end
3587
+
3588
+ # Font and other text style attributes.
3589
+ class GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo
3590
+ include Google::Apis::Core::Hashable
3591
+
3592
+ # Represents a color in the RGBA color space. This representation is designed
3593
+ # for simplicity of conversion to and from color representations in various
3594
+ # languages over compactness. For example, the fields of this representation can
3612
3595
  # be trivially provided to the constructor of `java.awt.Color` in Java; it can
3613
3596
  # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
3614
3597
  # method in iOS; and, with just a little work, it can be easily formatted into a
@@ -3655,6 +3638,74 @@ module Google
3655
3638
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3656
3639
  attr_accessor :background_color
3657
3640
 
3641
+ # Whether the text is bold (equivalent to font_weight is at least `700`).
3642
+ # Corresponds to the JSON property `bold`
3643
+ # @return [Boolean]
3644
+ attr_accessor :bold
3645
+ alias_method :bold?, :bold
3646
+
3647
+ # Font size in points (`1` point is `¹⁄₇₂` inches).
3648
+ # Corresponds to the JSON property `fontSize`
3649
+ # @return [Fixnum]
3650
+ attr_accessor :font_size
3651
+
3652
+ # Name or style of the font.
3653
+ # Corresponds to the JSON property `fontType`
3654
+ # @return [String]
3655
+ attr_accessor :font_type
3656
+
3657
+ # TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `
3658
+ # 400`, bold is `700`.
3659
+ # Corresponds to the JSON property `fontWeight`
3660
+ # @return [Fixnum]
3661
+ attr_accessor :font_weight
3662
+
3663
+ # Whether the text is handwritten.
3664
+ # Corresponds to the JSON property `handwritten`
3665
+ # @return [Boolean]
3666
+ attr_accessor :handwritten
3667
+ alias_method :handwritten?, :handwritten
3668
+
3669
+ # Whether the text is italic.
3670
+ # Corresponds to the JSON property `italic`
3671
+ # @return [Boolean]
3672
+ attr_accessor :italic
3673
+ alias_method :italic?, :italic
3674
+
3675
+ # Letter spacing in points.
3676
+ # Corresponds to the JSON property `letterSpacing`
3677
+ # @return [Float]
3678
+ attr_accessor :letter_spacing
3679
+
3680
+ # Font size in pixels, equal to _unrounded font_size_ * _resolution_ ÷ `72.0`.
3681
+ # Corresponds to the JSON property `pixelFontSize`
3682
+ # @return [Float]
3683
+ attr_accessor :pixel_font_size
3684
+
3685
+ # Whether the text is in small caps. This feature is not supported yet.
3686
+ # Corresponds to the JSON property `smallcaps`
3687
+ # @return [Boolean]
3688
+ attr_accessor :smallcaps
3689
+ alias_method :smallcaps?, :smallcaps
3690
+
3691
+ # Whether the text is strikethrough. This feature is not supported yet.
3692
+ # Corresponds to the JSON property `strikeout`
3693
+ # @return [Boolean]
3694
+ attr_accessor :strikeout
3695
+ alias_method :strikeout?, :strikeout
3696
+
3697
+ # Whether the text is a subscript. This feature is not supported yet.
3698
+ # Corresponds to the JSON property `subscript`
3699
+ # @return [Boolean]
3700
+ attr_accessor :subscript
3701
+ alias_method :subscript?, :subscript
3702
+
3703
+ # Whether the text is a superscript. This feature is not supported yet.
3704
+ # Corresponds to the JSON property `superscript`
3705
+ # @return [Boolean]
3706
+ attr_accessor :superscript
3707
+ alias_method :superscript?, :superscript
3708
+
3658
3709
  # Represents a color in the RGBA color space. This representation is designed
3659
3710
  # for simplicity of conversion to and from color representations in various
3660
3711
  # languages over compactness. For example, the fields of this representation can
@@ -3700,43 +3751,58 @@ module Google
3700
3751
  # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
3701
3752
  # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
3702
3753
  # / ...
3703
- # Corresponds to the JSON property `color`
3754
+ # Corresponds to the JSON property `textColor`
3704
3755
  # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
3705
- attr_accessor :color
3756
+ attr_accessor :text_color
3706
3757
 
3707
- # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/
3708
- # cssref/pr_font_font-family.asp
3709
- # Corresponds to the JSON property `fontFamily`
3710
- # @return [String]
3711
- attr_accessor :font_family
3758
+ # Whether the text is underlined.
3759
+ # Corresponds to the JSON property `underlined`
3760
+ # @return [Boolean]
3761
+ attr_accessor :underlined
3762
+ alias_method :underlined?, :underlined
3712
3763
 
3713
- # Font size with unit.
3714
- # Corresponds to the JSON property `fontSize`
3715
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentStyleFontSize]
3716
- attr_accessor :font_size
3764
+ def initialize(**args)
3765
+ update!(**args)
3766
+ end
3717
3767
 
3718
- # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible
3719
- # values are `normal`, `bold`, `bolder`, and `lighter`.
3720
- # Corresponds to the JSON property `fontWeight`
3721
- # @return [String]
3722
- attr_accessor :font_weight
3768
+ # Update properties of this object
3769
+ def update!(**args)
3770
+ @background_color = args[:background_color] if args.key?(:background_color)
3771
+ @bold = args[:bold] if args.key?(:bold)
3772
+ @font_size = args[:font_size] if args.key?(:font_size)
3773
+ @font_type = args[:font_type] if args.key?(:font_type)
3774
+ @font_weight = args[:font_weight] if args.key?(:font_weight)
3775
+ @handwritten = args[:handwritten] if args.key?(:handwritten)
3776
+ @italic = args[:italic] if args.key?(:italic)
3777
+ @letter_spacing = args[:letter_spacing] if args.key?(:letter_spacing)
3778
+ @pixel_font_size = args[:pixel_font_size] if args.key?(:pixel_font_size)
3779
+ @smallcaps = args[:smallcaps] if args.key?(:smallcaps)
3780
+ @strikeout = args[:strikeout] if args.key?(:strikeout)
3781
+ @subscript = args[:subscript] if args.key?(:subscript)
3782
+ @superscript = args[:superscript] if args.key?(:superscript)
3783
+ @text_color = args[:text_color] if args.key?(:text_color)
3784
+ @underlined = args[:underlined] if args.key?(:underlined)
3785
+ end
3786
+ end
3723
3787
 
3724
- # Text reference indexing into the Document.text.
3725
- # Corresponds to the JSON property `textAnchor`
3726
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
3727
- attr_accessor :text_anchor
3788
+ # Detected non-text visual elements e.g. checkbox, signature etc. on the page.
3789
+ class GoogleCloudDocumentaiV1beta1DocumentPageVisualElement
3790
+ include Google::Apis::Core::Hashable
3728
3791
 
3729
- # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp)
3730
- # . Follows CSS standard.
3731
- # Corresponds to the JSON property `textDecoration`
3732
- # @return [String]
3733
- attr_accessor :text_decoration
3792
+ # A list of detected languages together with confidence.
3793
+ # Corresponds to the JSON property `detectedLanguages`
3794
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage>]
3795
+ attr_accessor :detected_languages
3734
3796
 
3735
- # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
3736
- # Possible values are `normal`, `italic`, and `oblique`.
3737
- # Corresponds to the JSON property `textStyle`
3797
+ # Visual element describing a layout unit on a page.
3798
+ # Corresponds to the JSON property `layout`
3799
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentPageLayout]
3800
+ attr_accessor :layout
3801
+
3802
+ # Type of the VisualElement.
3803
+ # Corresponds to the JSON property `type`
3738
3804
  # @return [String]
3739
- attr_accessor :text_style
3805
+ attr_accessor :type
3740
3806
 
3741
3807
  def initialize(**args)
3742
3808
  update!(**args)
@@ -3744,30 +3810,36 @@ module Google
3744
3810
 
3745
3811
  # Update properties of this object
3746
3812
  def update!(**args)
3747
- @background_color = args[:background_color] if args.key?(:background_color)
3748
- @color = args[:color] if args.key?(:color)
3749
- @font_family = args[:font_family] if args.key?(:font_family)
3750
- @font_size = args[:font_size] if args.key?(:font_size)
3751
- @font_weight = args[:font_weight] if args.key?(:font_weight)
3752
- @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
3753
- @text_decoration = args[:text_decoration] if args.key?(:text_decoration)
3754
- @text_style = args[:text_style] if args.key?(:text_style)
3813
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
3814
+ @layout = args[:layout] if args.key?(:layout)
3815
+ @type = args[:type] if args.key?(:type)
3755
3816
  end
3756
3817
  end
3757
3818
 
3758
- # Font size with unit.
3759
- class GoogleCloudDocumentaiV1beta1DocumentStyleFontSize
3819
+ # Structure to identify provenance relationships between annotations in
3820
+ # different revisions.
3821
+ class GoogleCloudDocumentaiV1beta1DocumentProvenance
3760
3822
  include Google::Apis::Core::Hashable
3761
3823
 
3762
- # Font size for the text.
3763
- # Corresponds to the JSON property `size`
3764
- # @return [Float]
3765
- attr_accessor :size
3824
+ # The Id of this operation. Needs to be unique within the scope of the revision.
3825
+ # Corresponds to the JSON property `id`
3826
+ # @return [Fixnum]
3827
+ attr_accessor :id
3766
3828
 
3767
- # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
3768
- # Corresponds to the JSON property `unit`
3829
+ # References to the original elements that are replaced.
3830
+ # Corresponds to the JSON property `parents`
3831
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenanceParent>]
3832
+ attr_accessor :parents
3833
+
3834
+ # The index of the revision that produced this element.
3835
+ # Corresponds to the JSON property `revision`
3836
+ # @return [Fixnum]
3837
+ attr_accessor :revision
3838
+
3839
+ # The type of provenance operation.
3840
+ # Corresponds to the JSON property `type`
3769
3841
  # @return [String]
3770
- attr_accessor :unit
3842
+ attr_accessor :type
3771
3843
 
3772
3844
  def initialize(**args)
3773
3845
  update!(**args)
@@ -3775,25 +3847,828 @@ module Google
3775
3847
 
3776
3848
  # Update properties of this object
3777
3849
  def update!(**args)
3778
- @size = args[:size] if args.key?(:size)
3779
- @unit = args[:unit] if args.key?(:unit)
3850
+ @id = args[:id] if args.key?(:id)
3851
+ @parents = args[:parents] if args.key?(:parents)
3852
+ @revision = args[:revision] if args.key?(:revision)
3853
+ @type = args[:type] if args.key?(:type)
3780
3854
  end
3781
3855
  end
3782
3856
 
3783
- # Text reference indexing into the Document.text.
3784
- class GoogleCloudDocumentaiV1beta1DocumentTextAnchor
3785
- include Google::Apis::Core::Hashable
3857
+ # The parent element the current element is based on. Used for referencing/
3858
+ # aligning, removal and replacement operations.
3859
+ class GoogleCloudDocumentaiV1beta1DocumentProvenanceParent
3860
+ include Google::Apis::Core::Hashable
3861
+
3862
+ # The id of the parent provenance.
3863
+ # Corresponds to the JSON property `id`
3864
+ # @return [Fixnum]
3865
+ attr_accessor :id
3866
+
3867
+ # The index of the parent item in the corresponding item list (eg. list of
3868
+ # entities, properties within entities, etc.) in the parent revision.
3869
+ # Corresponds to the JSON property `index`
3870
+ # @return [Fixnum]
3871
+ attr_accessor :index
3872
+
3873
+ # The index of the index into current revision's parent_ids list.
3874
+ # Corresponds to the JSON property `revision`
3875
+ # @return [Fixnum]
3876
+ attr_accessor :revision
3877
+
3878
+ def initialize(**args)
3879
+ update!(**args)
3880
+ end
3881
+
3882
+ # Update properties of this object
3883
+ def update!(**args)
3884
+ @id = args[:id] if args.key?(:id)
3885
+ @index = args[:index] if args.key?(:index)
3886
+ @revision = args[:revision] if args.key?(:revision)
3887
+ end
3888
+ end
3889
+
3890
+ # Contains past or forward revisions of this document.
3891
+ class GoogleCloudDocumentaiV1beta1DocumentRevision
3892
+ include Google::Apis::Core::Hashable
3893
+
3894
+ # If the change was made by a person specify the name or id of that person.
3895
+ # Corresponds to the JSON property `agent`
3896
+ # @return [String]
3897
+ attr_accessor :agent
3898
+
3899
+ # The time that the revision was created, internally generated by doc proto
3900
+ # storage at the time of create.
3901
+ # Corresponds to the JSON property `createTime`
3902
+ # @return [String]
3903
+ attr_accessor :create_time
3904
+
3905
+ # Human Review information of the document.
3906
+ # Corresponds to the JSON property `humanReview`
3907
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview]
3908
+ attr_accessor :human_review
3909
+
3910
+ # Id of the revision, internally generated by doc proto storage. Unique within
3911
+ # the context of the document.
3912
+ # Corresponds to the JSON property `id`
3913
+ # @return [String]
3914
+ attr_accessor :id
3915
+
3916
+ # The revisions that this revision is based on. This can include one or more
3917
+ # parent (when documents are merged.) This field represents the index into the `
3918
+ # revisions` field.
3919
+ # Corresponds to the JSON property `parent`
3920
+ # @return [Array<Fixnum>]
3921
+ attr_accessor :parent
3922
+
3923
+ # The revisions that this revision is based on. Must include all the ids that
3924
+ # have anything to do with this revision - eg. there are `provenance.parent.
3925
+ # revision` fields that index into this field.
3926
+ # Corresponds to the JSON property `parentIds`
3927
+ # @return [Array<String>]
3928
+ attr_accessor :parent_ids
3929
+
3930
+ # If the annotation was made by processor identify the processor by its resource
3931
+ # name.
3932
+ # Corresponds to the JSON property `processor`
3933
+ # @return [String]
3934
+ attr_accessor :processor
3935
+
3936
+ def initialize(**args)
3937
+ update!(**args)
3938
+ end
3939
+
3940
+ # Update properties of this object
3941
+ def update!(**args)
3942
+ @agent = args[:agent] if args.key?(:agent)
3943
+ @create_time = args[:create_time] if args.key?(:create_time)
3944
+ @human_review = args[:human_review] if args.key?(:human_review)
3945
+ @id = args[:id] if args.key?(:id)
3946
+ @parent = args[:parent] if args.key?(:parent)
3947
+ @parent_ids = args[:parent_ids] if args.key?(:parent_ids)
3948
+ @processor = args[:processor] if args.key?(:processor)
3949
+ end
3950
+ end
3951
+
3952
+ # Human Review information of the document.
3953
+ class GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview
3954
+ include Google::Apis::Core::Hashable
3955
+
3956
+ # Human review state. e.g. `requested`, `succeeded`, `rejected`.
3957
+ # Corresponds to the JSON property `state`
3958
+ # @return [String]
3959
+ attr_accessor :state
3960
+
3961
+ # A message providing more details about the current state of processing. For
3962
+ # example, the rejection reason when the state is `rejected`.
3963
+ # Corresponds to the JSON property `stateMessage`
3964
+ # @return [String]
3965
+ attr_accessor :state_message
3966
+
3967
+ def initialize(**args)
3968
+ update!(**args)
3969
+ end
3970
+
3971
+ # Update properties of this object
3972
+ def update!(**args)
3973
+ @state = args[:state] if args.key?(:state)
3974
+ @state_message = args[:state_message] if args.key?(:state_message)
3975
+ end
3976
+ end
3977
+
3978
+ # For a large document, sharding may be performed to produce several document
3979
+ # shards. Each document shard contains this field to detail which shard it is.
3980
+ class GoogleCloudDocumentaiV1beta1DocumentShardInfo
3981
+ include Google::Apis::Core::Hashable
3982
+
3983
+ # Total number of shards.
3984
+ # Corresponds to the JSON property `shardCount`
3985
+ # @return [Fixnum]
3986
+ attr_accessor :shard_count
3987
+
3988
+ # The 0-based index of this shard.
3989
+ # Corresponds to the JSON property `shardIndex`
3990
+ # @return [Fixnum]
3991
+ attr_accessor :shard_index
3992
+
3993
+ # The index of the first character in Document.text in the overall document
3994
+ # global text.
3995
+ # Corresponds to the JSON property `textOffset`
3996
+ # @return [Fixnum]
3997
+ attr_accessor :text_offset
3998
+
3999
+ def initialize(**args)
4000
+ update!(**args)
4001
+ end
4002
+
4003
+ # Update properties of this object
4004
+ def update!(**args)
4005
+ @shard_count = args[:shard_count] if args.key?(:shard_count)
4006
+ @shard_index = args[:shard_index] if args.key?(:shard_index)
4007
+ @text_offset = args[:text_offset] if args.key?(:text_offset)
4008
+ end
4009
+ end
4010
+
4011
+ # Annotation for common text style attributes. This adheres to CSS conventions
4012
+ # as much as possible.
4013
+ class GoogleCloudDocumentaiV1beta1DocumentStyle
4014
+ include Google::Apis::Core::Hashable
4015
+
4016
+ # Represents a color in the RGBA color space. This representation is designed
4017
+ # for simplicity of conversion to and from color representations in various
4018
+ # languages over compactness. For example, the fields of this representation can
4019
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
4020
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
4021
+ # method in iOS; and, with just a little work, it can be easily formatted into a
4022
+ # CSS `rgba()` string in JavaScript. This reference page doesn't have
4023
+ # information about the absolute color space that should be used to interpret
4024
+ # the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
4025
+ # applications should assume the sRGB color space. When color equality needs to
4026
+ # be decided, implementations, unless documented otherwise, treat two colors as
4027
+ # equal if all their red, green, blue, and alpha values each differ by at most `
4028
+ # 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
4029
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
4030
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
4031
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
4032
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
4033
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
4034
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
4035
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
4036
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
4037
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
4038
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
4039
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
4040
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
4041
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
4042
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
4043
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
4044
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
4045
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
4046
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
4047
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
4048
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
4049
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
4050
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
4051
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
4052
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
4053
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
4054
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
4055
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
4056
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
4057
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
4058
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
4059
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
4060
+ # / ...
4061
+ # Corresponds to the JSON property `backgroundColor`
4062
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
4063
+ attr_accessor :background_color
4064
+
4065
+ # Represents a color in the RGBA color space. This representation is designed
4066
+ # for simplicity of conversion to and from color representations in various
4067
+ # languages over compactness. For example, the fields of this representation can
4068
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
4069
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
4070
+ # method in iOS; and, with just a little work, it can be easily formatted into a
4071
+ # CSS `rgba()` string in JavaScript. This reference page doesn't have
4072
+ # information about the absolute color space that should be used to interpret
4073
+ # the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default,
4074
+ # applications should assume the sRGB color space. When color equality needs to
4075
+ # be decided, implementations, unless documented otherwise, treat two colors as
4076
+ # equal if all their red, green, blue, and alpha values each differ by at most `
4077
+ # 1e-5`. Example (Java): import com.google.type.Color; // ... public static java.
4078
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
4079
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
4080
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
4081
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
4082
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
4083
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
4084
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
4085
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
4086
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
4087
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
4088
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
4089
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
4090
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
4091
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
4092
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
4093
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
4094
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
4095
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
4096
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
4097
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
4098
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
4099
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
4100
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
4101
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
4102
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
4103
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
4104
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
4105
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
4106
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
4107
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
4108
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
4109
+ # / ...
4110
+ # Corresponds to the JSON property `color`
4111
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleTypeColor]
4112
+ attr_accessor :color
4113
+
4114
+ # Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/
4115
+ # cssref/pr_font_font-family.asp
4116
+ # Corresponds to the JSON property `fontFamily`
4117
+ # @return [String]
4118
+ attr_accessor :font_family
4119
+
4120
+ # Font size with unit.
4121
+ # Corresponds to the JSON property `fontSize`
4122
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentStyleFontSize]
4123
+ attr_accessor :font_size
4124
+
4125
+ # [Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible
4126
+ # values are `normal`, `bold`, `bolder`, and `lighter`.
4127
+ # Corresponds to the JSON property `fontWeight`
4128
+ # @return [String]
4129
+ attr_accessor :font_weight
4130
+
4131
+ # Text reference indexing into the Document.text.
4132
+ # Corresponds to the JSON property `textAnchor`
4133
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
4134
+ attr_accessor :text_anchor
4135
+
4136
+ # [Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp)
4137
+ # . Follows CSS standard.
4138
+ # Corresponds to the JSON property `textDecoration`
4139
+ # @return [String]
4140
+ attr_accessor :text_decoration
4141
+
4142
+ # [Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp).
4143
+ # Possible values are `normal`, `italic`, and `oblique`.
4144
+ # Corresponds to the JSON property `textStyle`
4145
+ # @return [String]
4146
+ attr_accessor :text_style
4147
+
4148
+ def initialize(**args)
4149
+ update!(**args)
4150
+ end
4151
+
4152
+ # Update properties of this object
4153
+ def update!(**args)
4154
+ @background_color = args[:background_color] if args.key?(:background_color)
4155
+ @color = args[:color] if args.key?(:color)
4156
+ @font_family = args[:font_family] if args.key?(:font_family)
4157
+ @font_size = args[:font_size] if args.key?(:font_size)
4158
+ @font_weight = args[:font_weight] if args.key?(:font_weight)
4159
+ @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
4160
+ @text_decoration = args[:text_decoration] if args.key?(:text_decoration)
4161
+ @text_style = args[:text_style] if args.key?(:text_style)
4162
+ end
4163
+ end
4164
+
4165
+ # Font size with unit.
4166
+ class GoogleCloudDocumentaiV1beta1DocumentStyleFontSize
4167
+ include Google::Apis::Core::Hashable
4168
+
4169
+ # Font size for the text.
4170
+ # Corresponds to the JSON property `size`
4171
+ # @return [Float]
4172
+ attr_accessor :size
4173
+
4174
+ # Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).
4175
+ # Corresponds to the JSON property `unit`
4176
+ # @return [String]
4177
+ attr_accessor :unit
4178
+
4179
+ def initialize(**args)
4180
+ update!(**args)
4181
+ end
4182
+
4183
+ # Update properties of this object
4184
+ def update!(**args)
4185
+ @size = args[:size] if args.key?(:size)
4186
+ @unit = args[:unit] if args.key?(:unit)
4187
+ end
4188
+ end
4189
+
4190
+ # Text reference indexing into the Document.text.
4191
+ class GoogleCloudDocumentaiV1beta1DocumentTextAnchor
4192
+ include Google::Apis::Core::Hashable
4193
+
4194
+ # Contains the content of the text span so that users do not have to look it up
4195
+ # in the text_segments. It is always populated for formFields.
4196
+ # Corresponds to the JSON property `content`
4197
+ # @return [String]
4198
+ attr_accessor :content
4199
+
4200
+ # The text segments from the Document.text.
4201
+ # Corresponds to the JSON property `textSegments`
4202
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment>]
4203
+ attr_accessor :text_segments
4204
+
4205
+ def initialize(**args)
4206
+ update!(**args)
4207
+ end
4208
+
4209
+ # Update properties of this object
4210
+ def update!(**args)
4211
+ @content = args[:content] if args.key?(:content)
4212
+ @text_segments = args[:text_segments] if args.key?(:text_segments)
4213
+ end
4214
+ end
4215
+
4216
+ # A text segment in the Document.text. The indices may be out of bounds which
4217
+ # indicate that the text extends into another document shard for large sharded
4218
+ # documents. See ShardInfo.text_offset
4219
+ class GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
4220
+ include Google::Apis::Core::Hashable
4221
+
4222
+ # TextSegment half open end UTF-8 char index in the Document.text.
4223
+ # Corresponds to the JSON property `endIndex`
4224
+ # @return [Fixnum]
4225
+ attr_accessor :end_index
4226
+
4227
+ # TextSegment start UTF-8 char index in the Document.text.
4228
+ # Corresponds to the JSON property `startIndex`
4229
+ # @return [Fixnum]
4230
+ attr_accessor :start_index
4231
+
4232
+ def initialize(**args)
4233
+ update!(**args)
4234
+ end
4235
+
4236
+ # Update properties of this object
4237
+ def update!(**args)
4238
+ @end_index = args[:end_index] if args.key?(:end_index)
4239
+ @start_index = args[:start_index] if args.key?(:start_index)
4240
+ end
4241
+ end
4242
+
4243
+ # This message is used for text changes aka. OCR corrections.
4244
+ class GoogleCloudDocumentaiV1beta1DocumentTextChange
4245
+ include Google::Apis::Core::Hashable
4246
+
4247
+ # The text that replaces the text identified in the `text_anchor`.
4248
+ # Corresponds to the JSON property `changedText`
4249
+ # @return [String]
4250
+ attr_accessor :changed_text
4251
+
4252
+ # The history of this annotation.
4253
+ # Corresponds to the JSON property `provenance`
4254
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance>]
4255
+ attr_accessor :provenance
4256
+
4257
+ # Text reference indexing into the Document.text.
4258
+ # Corresponds to the JSON property `textAnchor`
4259
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
4260
+ attr_accessor :text_anchor
4261
+
4262
+ def initialize(**args)
4263
+ update!(**args)
4264
+ end
4265
+
4266
+ # Update properties of this object
4267
+ def update!(**args)
4268
+ @changed_text = args[:changed_text] if args.key?(:changed_text)
4269
+ @provenance = args[:provenance] if args.key?(:provenance)
4270
+ @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
4271
+ end
4272
+ end
4273
+
4274
+ # The Google Cloud Storage location where the output file will be written to.
4275
+ class GoogleCloudDocumentaiV1beta1GcsDestination
4276
+ include Google::Apis::Core::Hashable
4277
+
4278
+ #
4279
+ # Corresponds to the JSON property `uri`
4280
+ # @return [String]
4281
+ attr_accessor :uri
4282
+
4283
+ def initialize(**args)
4284
+ update!(**args)
4285
+ end
4286
+
4287
+ # Update properties of this object
4288
+ def update!(**args)
4289
+ @uri = args[:uri] if args.key?(:uri)
4290
+ end
4291
+ end
4292
+
4293
+ # The Google Cloud Storage location where the input file will be read from.
4294
+ class GoogleCloudDocumentaiV1beta1GcsSource
4295
+ include Google::Apis::Core::Hashable
4296
+
4297
+ #
4298
+ # Corresponds to the JSON property `uri`
4299
+ # @return [String]
4300
+ attr_accessor :uri
4301
+
4302
+ def initialize(**args)
4303
+ update!(**args)
4304
+ end
4305
+
4306
+ # Update properties of this object
4307
+ def update!(**args)
4308
+ @uri = args[:uri] if args.key?(:uri)
4309
+ end
4310
+ end
4311
+
4312
+ # The desired input location and metadata.
4313
+ class GoogleCloudDocumentaiV1beta1InputConfig
4314
+ include Google::Apis::Core::Hashable
4315
+
4316
+ # The Google Cloud Storage location where the input file will be read from.
4317
+ # Corresponds to the JSON property `gcsSource`
4318
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1GcsSource]
4319
+ attr_accessor :gcs_source
4320
+
4321
+ # Required. Mimetype of the input. Current supported mimetypes are application/
4322
+ # pdf, image/tiff, and image/gif. In addition, application/json type is
4323
+ # supported for requests with ProcessDocumentRequest.automl_params field set.
4324
+ # The JSON file needs to be in Document format.
4325
+ # Corresponds to the JSON property `mimeType`
4326
+ # @return [String]
4327
+ attr_accessor :mime_type
4328
+
4329
+ def initialize(**args)
4330
+ update!(**args)
4331
+ end
4332
+
4333
+ # Update properties of this object
4334
+ def update!(**args)
4335
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
4336
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
4337
+ end
4338
+ end
4339
+
4340
+ # A vertex represents a 2D point in the image. NOTE: the normalized vertex
4341
+ # coordinates are relative to the original image and range from 0 to 1.
4342
+ class GoogleCloudDocumentaiV1beta1NormalizedVertex
4343
+ include Google::Apis::Core::Hashable
4344
+
4345
+ # X coordinate.
4346
+ # Corresponds to the JSON property `x`
4347
+ # @return [Float]
4348
+ attr_accessor :x
4349
+
4350
+ # Y coordinate (starts from the top of the image).
4351
+ # Corresponds to the JSON property `y`
4352
+ # @return [Float]
4353
+ attr_accessor :y
4354
+
4355
+ def initialize(**args)
4356
+ update!(**args)
4357
+ end
4358
+
4359
+ # Update properties of this object
4360
+ def update!(**args)
4361
+ @x = args[:x] if args.key?(:x)
4362
+ @y = args[:y] if args.key?(:y)
4363
+ end
4364
+ end
4365
+
4366
+ # Contains metadata for the BatchProcessDocuments operation.
4367
+ class GoogleCloudDocumentaiV1beta1OperationMetadata
4368
+ include Google::Apis::Core::Hashable
4369
+
4370
+ # The creation time of the operation.
4371
+ # Corresponds to the JSON property `createTime`
4372
+ # @return [String]
4373
+ attr_accessor :create_time
4374
+
4375
+ # The state of the current batch processing.
4376
+ # Corresponds to the JSON property `state`
4377
+ # @return [String]
4378
+ attr_accessor :state
4379
+
4380
+ # A message providing more details about the current state of processing.
4381
+ # Corresponds to the JSON property `stateMessage`
4382
+ # @return [String]
4383
+ attr_accessor :state_message
4384
+
4385
+ # The last update time of the operation.
4386
+ # Corresponds to the JSON property `updateTime`
4387
+ # @return [String]
4388
+ attr_accessor :update_time
4389
+
4390
+ def initialize(**args)
4391
+ update!(**args)
4392
+ end
4393
+
4394
+ # Update properties of this object
4395
+ def update!(**args)
4396
+ @create_time = args[:create_time] if args.key?(:create_time)
4397
+ @state = args[:state] if args.key?(:state)
4398
+ @state_message = args[:state_message] if args.key?(:state_message)
4399
+ @update_time = args[:update_time] if args.key?(:update_time)
4400
+ end
4401
+ end
4402
+
4403
+ # The desired output location and metadata.
4404
+ class GoogleCloudDocumentaiV1beta1OutputConfig
4405
+ include Google::Apis::Core::Hashable
4406
+
4407
+ # The Google Cloud Storage location where the output file will be written to.
4408
+ # Corresponds to the JSON property `gcsDestination`
4409
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1GcsDestination]
4410
+ attr_accessor :gcs_destination
4411
+
4412
+ # The max number of pages to include into each output Document shard JSON on
4413
+ # Google Cloud Storage. The valid range is [1, 100]. If not specified, the
4414
+ # default value is 20. For example, for one pdf file with 100 pages, 100 parsed
4415
+ # pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON
4416
+ # files each containing 20 parsed pages will be written under the prefix
4417
+ # OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y
4418
+ # are 1-indexed page numbers. Example GCS outputs with 157 pages and
4419
+ # pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-
4420
+ # 150.json pages-151-to-157.json
4421
+ # Corresponds to the JSON property `pagesPerShard`
4422
+ # @return [Fixnum]
4423
+ attr_accessor :pages_per_shard
4424
+
4425
+ def initialize(**args)
4426
+ update!(**args)
4427
+ end
4428
+
4429
+ # Update properties of this object
4430
+ def update!(**args)
4431
+ @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
4432
+ @pages_per_shard = args[:pages_per_shard] if args.key?(:pages_per_shard)
4433
+ end
4434
+ end
4435
+
4436
+ # Response to a single document processing request.
4437
+ class GoogleCloudDocumentaiV1beta1ProcessDocumentResponse
4438
+ include Google::Apis::Core::Hashable
4439
+
4440
+ # The desired input location and metadata.
4441
+ # Corresponds to the JSON property `inputConfig`
4442
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1InputConfig]
4443
+ attr_accessor :input_config
4444
+
4445
+ # The desired output location and metadata.
4446
+ # Corresponds to the JSON property `outputConfig`
4447
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1OutputConfig]
4448
+ attr_accessor :output_config
4449
+
4450
+ def initialize(**args)
4451
+ update!(**args)
4452
+ end
4453
+
4454
+ # Update properties of this object
4455
+ def update!(**args)
4456
+ @input_config = args[:input_config] if args.key?(:input_config)
4457
+ @output_config = args[:output_config] if args.key?(:output_config)
4458
+ end
4459
+ end
4460
+
4461
+ # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are
4462
+ # in the same scale as the original image.
4463
+ class GoogleCloudDocumentaiV1beta1Vertex
4464
+ include Google::Apis::Core::Hashable
4465
+
4466
+ # X coordinate.
4467
+ # Corresponds to the JSON property `x`
4468
+ # @return [Fixnum]
4469
+ attr_accessor :x
4470
+
4471
+ # Y coordinate (starts from the top of the image).
4472
+ # Corresponds to the JSON property `y`
4473
+ # @return [Fixnum]
4474
+ attr_accessor :y
4475
+
4476
+ def initialize(**args)
4477
+ update!(**args)
4478
+ end
4479
+
4480
+ # Update properties of this object
4481
+ def update!(**args)
4482
+ @x = args[:x] if args.key?(:x)
4483
+ @y = args[:y] if args.key?(:y)
4484
+ end
4485
+ end
4486
+
4487
+ # Encodes the detailed information of a barcode.
4488
+ class GoogleCloudDocumentaiV1beta2Barcode
4489
+ include Google::Apis::Core::Hashable
4490
+
4491
+ # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. -
4492
+ # `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type.
4493
+ # - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13
4494
+ # type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A
4495
+ # type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code
4496
+ # type. - `DATABAR`: GS1 DataBar code type.
4497
+ # Corresponds to the JSON property `format`
4498
+ # @return [String]
4499
+ attr_accessor :format
4500
+
4501
+ # Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https:/
4502
+ # /www.google.com;;'`.
4503
+ # Corresponds to the JSON property `rawValue`
4504
+ # @return [String]
4505
+ attr_accessor :raw_value
4506
+
4507
+ # Value format describes the format of the value that a barcode encodes. The
4508
+ # supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email
4509
+ # address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`:
4510
+ # Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `
4511
+ # WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`:
4512
+ # Calendar event. - `DRIVER_LICENSE`: Driver's license.
4513
+ # Corresponds to the JSON property `valueFormat`
4514
+ # @return [String]
4515
+ attr_accessor :value_format
4516
+
4517
+ def initialize(**args)
4518
+ update!(**args)
4519
+ end
4520
+
4521
+ # Update properties of this object
4522
+ def update!(**args)
4523
+ @format = args[:format] if args.key?(:format)
4524
+ @raw_value = args[:raw_value] if args.key?(:raw_value)
4525
+ @value_format = args[:value_format] if args.key?(:value_format)
4526
+ end
4527
+ end
4528
+
4529
+ # Response to an batch document processing request. This is returned in the LRO
4530
+ # Operation after the operation is complete.
4531
+ class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse
4532
+ include Google::Apis::Core::Hashable
4533
+
4534
+ # Responses for each individual document.
4535
+ # Corresponds to the JSON property `responses`
4536
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2ProcessDocumentResponse>]
4537
+ attr_accessor :responses
4538
+
4539
+ def initialize(**args)
4540
+ update!(**args)
4541
+ end
4542
+
4543
+ # Update properties of this object
4544
+ def update!(**args)
4545
+ @responses = args[:responses] if args.key?(:responses)
4546
+ end
4547
+ end
4548
+
4549
+ # A bounding polygon for the detected image annotation.
4550
+ class GoogleCloudDocumentaiV1beta2BoundingPoly
4551
+ include Google::Apis::Core::Hashable
4552
+
4553
+ # The bounding polygon normalized vertices.
4554
+ # Corresponds to the JSON property `normalizedVertices`
4555
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2NormalizedVertex>]
4556
+ attr_accessor :normalized_vertices
4557
+
4558
+ # The bounding polygon vertices.
4559
+ # Corresponds to the JSON property `vertices`
4560
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2Vertex>]
4561
+ attr_accessor :vertices
4562
+
4563
+ def initialize(**args)
4564
+ update!(**args)
4565
+ end
4566
+
4567
+ # Update properties of this object
4568
+ def update!(**args)
4569
+ @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
4570
+ @vertices = args[:vertices] if args.key?(:vertices)
4571
+ end
4572
+ end
4573
+
4574
+ # Document represents the canonical document resource in Document AI. It is an
4575
+ # interchange format that provides insights into documents and allows for
4576
+ # collaboration between users and Document AI to iterate and optimize for
4577
+ # quality.
4578
+ class GoogleCloudDocumentaiV1beta2Document
4579
+ include Google::Apis::Core::Hashable
4580
+
4581
+ # Represents the chunks that the document is divided into.
4582
+ # Corresponds to the JSON property `chunkedDocument`
4583
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocument]
4584
+ attr_accessor :chunked_document
4585
+
4586
+ # Optional. Inline document content, represented as a stream of bytes. Note: As
4587
+ # with all `bytes` fields, protobuffers use a pure binary representation,
4588
+ # whereas JSON representations use base64.
4589
+ # Corresponds to the JSON property `content`
4590
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
4591
+ # @return [String]
4592
+ attr_accessor :content
4593
+
4594
+ # Represents the parsed layout of a document as a collection of blocks that the
4595
+ # document is divided into.
4596
+ # Corresponds to the JSON property `documentLayout`
4597
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayout]
4598
+ attr_accessor :document_layout
4599
+
4600
+ # A list of entities detected on Document.text. For document shards, entities in
4601
+ # this list may cross shard boundaries.
4602
+ # Corresponds to the JSON property `entities`
4603
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentEntity>]
4604
+ attr_accessor :entities
4605
+
4606
+ # Placeholder. Relationship among Document.entities.
4607
+ # Corresponds to the JSON property `entityRelations`
4608
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentEntityRelation>]
4609
+ attr_accessor :entity_relations
4610
+
4611
+ # The `Status` type defines a logical error model that is suitable for different
4612
+ # programming environments, including REST APIs and RPC APIs. It is used by [
4613
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
4614
+ # data: error code, error message, and error details. You can find out more
4615
+ # about this error model and how to work with it in the [API Design Guide](https:
4616
+ # //cloud.google.com/apis/design/errors).
4617
+ # Corresponds to the JSON property `error`
4618
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleRpcStatus]
4619
+ attr_accessor :error
4620
+
4621
+ # Labels for this document.
4622
+ # Corresponds to the JSON property `labels`
4623
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentLabel>]
4624
+ attr_accessor :labels
4625
+
4626
+ # An IANA published [media type (MIME type)](https://www.iana.org/assignments/
4627
+ # media-types/media-types.xhtml).
4628
+ # Corresponds to the JSON property `mimeType`
4629
+ # @return [String]
4630
+ attr_accessor :mime_type
4631
+
4632
+ # Visual page layout for the Document.
4633
+ # Corresponds to the JSON property `pages`
4634
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentPage>]
4635
+ attr_accessor :pages
4636
+
4637
+ # Placeholder. Revision history of this document.
4638
+ # Corresponds to the JSON property `revisions`
4639
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentRevision>]
4640
+ attr_accessor :revisions
4641
+
4642
+ # For a large document, sharding may be performed to produce several document
4643
+ # shards. Each document shard contains this field to detail which shard it is.
4644
+ # Corresponds to the JSON property `shardInfo`
4645
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentShardInfo]
4646
+ attr_accessor :shard_info
3786
4647
 
3787
- # Contains the content of the text span so that users do not have to look it up
3788
- # in the text_segments. It is always populated for formFields.
3789
- # Corresponds to the JSON property `content`
4648
+ # Optional. UTF-8 encoded text in reading order from the document.
4649
+ # Corresponds to the JSON property `text`
3790
4650
  # @return [String]
3791
- attr_accessor :content
4651
+ attr_accessor :text
3792
4652
 
3793
- # The text segments from the Document.text.
3794
- # Corresponds to the JSON property `textSegments`
3795
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment>]
3796
- attr_accessor :text_segments
4653
+ # Placeholder. A list of text corrections made to Document.text. This is usually
4654
+ # used for annotating corrections to OCR mistakes. Text changes for a given
4655
+ # revision may not overlap with each other.
4656
+ # Corresponds to the JSON property `textChanges`
4657
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentTextChange>]
4658
+ attr_accessor :text_changes
4659
+
4660
+ # Styles for the Document.text.
4661
+ # Corresponds to the JSON property `textStyles`
4662
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentStyle>]
4663
+ attr_accessor :text_styles
4664
+
4665
+ # Optional. Currently supports Google Cloud Storage URI of the form `gs://
4666
+ # bucket_name/object_name`. Object versioning is not supported. For more
4667
+ # information, refer to [Google Cloud Storage Request URIs](https://cloud.google.
4668
+ # com/storage/docs/reference-uris).
4669
+ # Corresponds to the JSON property `uri`
4670
+ # @return [String]
4671
+ attr_accessor :uri
3797
4672
 
3798
4673
  def initialize(**args)
3799
4674
  update!(**args)
@@ -3801,26 +4676,32 @@ module Google
3801
4676
 
3802
4677
  # Update properties of this object
3803
4678
  def update!(**args)
4679
+ @chunked_document = args[:chunked_document] if args.key?(:chunked_document)
3804
4680
  @content = args[:content] if args.key?(:content)
3805
- @text_segments = args[:text_segments] if args.key?(:text_segments)
4681
+ @document_layout = args[:document_layout] if args.key?(:document_layout)
4682
+ @entities = args[:entities] if args.key?(:entities)
4683
+ @entity_relations = args[:entity_relations] if args.key?(:entity_relations)
4684
+ @error = args[:error] if args.key?(:error)
4685
+ @labels = args[:labels] if args.key?(:labels)
4686
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
4687
+ @pages = args[:pages] if args.key?(:pages)
4688
+ @revisions = args[:revisions] if args.key?(:revisions)
4689
+ @shard_info = args[:shard_info] if args.key?(:shard_info)
4690
+ @text = args[:text] if args.key?(:text)
4691
+ @text_changes = args[:text_changes] if args.key?(:text_changes)
4692
+ @text_styles = args[:text_styles] if args.key?(:text_styles)
4693
+ @uri = args[:uri] if args.key?(:uri)
3806
4694
  end
3807
4695
  end
3808
4696
 
3809
- # A text segment in the Document.text. The indices may be out of bounds which
3810
- # indicate that the text extends into another document shard for large sharded
3811
- # documents. See ShardInfo.text_offset
3812
- class GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
4697
+ # Represents the chunks that the document is divided into.
4698
+ class GoogleCloudDocumentaiV1beta2DocumentChunkedDocument
3813
4699
  include Google::Apis::Core::Hashable
3814
4700
 
3815
- # TextSegment half open end UTF-8 char index in the Document.text.
3816
- # Corresponds to the JSON property `endIndex`
3817
- # @return [Fixnum]
3818
- attr_accessor :end_index
3819
-
3820
- # TextSegment start UTF-8 char index in the Document.text.
3821
- # Corresponds to the JSON property `startIndex`
3822
- # @return [Fixnum]
3823
- attr_accessor :start_index
4701
+ # List of chunks.
4702
+ # Corresponds to the JSON property `chunks`
4703
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk>]
4704
+ attr_accessor :chunks
3824
4705
 
3825
4706
  def initialize(**args)
3826
4707
  update!(**args)
@@ -3828,29 +4709,43 @@ module Google
3828
4709
 
3829
4710
  # Update properties of this object
3830
4711
  def update!(**args)
3831
- @end_index = args[:end_index] if args.key?(:end_index)
3832
- @start_index = args[:start_index] if args.key?(:start_index)
4712
+ @chunks = args[:chunks] if args.key?(:chunks)
3833
4713
  end
3834
4714
  end
3835
4715
 
3836
- # This message is used for text changes aka. OCR corrections.
3837
- class GoogleCloudDocumentaiV1beta1DocumentTextChange
4716
+ # Represents a chunk.
4717
+ class GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk
3838
4718
  include Google::Apis::Core::Hashable
3839
4719
 
3840
- # The text that replaces the text identified in the `text_anchor`.
3841
- # Corresponds to the JSON property `changedText`
4720
+ # ID of the chunk.
4721
+ # Corresponds to the JSON property `chunkId`
3842
4722
  # @return [String]
3843
- attr_accessor :changed_text
4723
+ attr_accessor :chunk_id
3844
4724
 
3845
- # The history of this annotation.
3846
- # Corresponds to the JSON property `provenance`
3847
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentProvenance>]
3848
- attr_accessor :provenance
4725
+ # Text content of the chunk.
4726
+ # Corresponds to the JSON property `content`
4727
+ # @return [String]
4728
+ attr_accessor :content
3849
4729
 
3850
- # Text reference indexing into the Document.text.
3851
- # Corresponds to the JSON property `textAnchor`
3852
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1DocumentTextAnchor]
3853
- attr_accessor :text_anchor
4730
+ # Page footers associated with the chunk.
4731
+ # Corresponds to the JSON property `pageFooters`
4732
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter>]
4733
+ attr_accessor :page_footers
4734
+
4735
+ # Page headers associated with the chunk.
4736
+ # Corresponds to the JSON property `pageHeaders`
4737
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader>]
4738
+ attr_accessor :page_headers
4739
+
4740
+ # Represents where the chunk starts and ends in the document.
4741
+ # Corresponds to the JSON property `pageSpan`
4742
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan]
4743
+ attr_accessor :page_span
4744
+
4745
+ # Unused.
4746
+ # Corresponds to the JSON property `sourceBlockIds`
4747
+ # @return [Array<String>]
4748
+ attr_accessor :source_block_ids
3854
4749
 
3855
4750
  def initialize(**args)
3856
4751
  update!(**args)
@@ -3858,20 +4753,28 @@ module Google
3858
4753
 
3859
4754
  # Update properties of this object
3860
4755
  def update!(**args)
3861
- @changed_text = args[:changed_text] if args.key?(:changed_text)
3862
- @provenance = args[:provenance] if args.key?(:provenance)
3863
- @text_anchor = args[:text_anchor] if args.key?(:text_anchor)
4756
+ @chunk_id = args[:chunk_id] if args.key?(:chunk_id)
4757
+ @content = args[:content] if args.key?(:content)
4758
+ @page_footers = args[:page_footers] if args.key?(:page_footers)
4759
+ @page_headers = args[:page_headers] if args.key?(:page_headers)
4760
+ @page_span = args[:page_span] if args.key?(:page_span)
4761
+ @source_block_ids = args[:source_block_ids] if args.key?(:source_block_ids)
3864
4762
  end
3865
4763
  end
3866
4764
 
3867
- # The Google Cloud Storage location where the output file will be written to.
3868
- class GoogleCloudDocumentaiV1beta1GcsDestination
4765
+ # Represents the page footer associated with the chunk.
4766
+ class GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter
3869
4767
  include Google::Apis::Core::Hashable
3870
4768
 
3871
- #
3872
- # Corresponds to the JSON property `uri`
4769
+ # Represents where the chunk starts and ends in the document.
4770
+ # Corresponds to the JSON property `pageSpan`
4771
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan]
4772
+ attr_accessor :page_span
4773
+
4774
+ # Footer in text format.
4775
+ # Corresponds to the JSON property `text`
3873
4776
  # @return [String]
3874
- attr_accessor :uri
4777
+ attr_accessor :text
3875
4778
 
3876
4779
  def initialize(**args)
3877
4780
  update!(**args)
@@ -3879,18 +4782,24 @@ module Google
3879
4782
 
3880
4783
  # Update properties of this object
3881
4784
  def update!(**args)
3882
- @uri = args[:uri] if args.key?(:uri)
4785
+ @page_span = args[:page_span] if args.key?(:page_span)
4786
+ @text = args[:text] if args.key?(:text)
3883
4787
  end
3884
4788
  end
3885
4789
 
3886
- # The Google Cloud Storage location where the input file will be read from.
3887
- class GoogleCloudDocumentaiV1beta1GcsSource
4790
+ # Represents the page header associated with the chunk.
4791
+ class GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader
3888
4792
  include Google::Apis::Core::Hashable
3889
4793
 
3890
- #
3891
- # Corresponds to the JSON property `uri`
4794
+ # Represents where the chunk starts and ends in the document.
4795
+ # Corresponds to the JSON property `pageSpan`
4796
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan]
4797
+ attr_accessor :page_span
4798
+
4799
+ # Header in text format.
4800
+ # Corresponds to the JSON property `text`
3892
4801
  # @return [String]
3893
- attr_accessor :uri
4802
+ attr_accessor :text
3894
4803
 
3895
4804
  def initialize(**args)
3896
4805
  update!(**args)
@@ -3898,26 +4807,24 @@ module Google
3898
4807
 
3899
4808
  # Update properties of this object
3900
4809
  def update!(**args)
3901
- @uri = args[:uri] if args.key?(:uri)
4810
+ @page_span = args[:page_span] if args.key?(:page_span)
4811
+ @text = args[:text] if args.key?(:text)
3902
4812
  end
3903
4813
  end
3904
4814
 
3905
- # The desired input location and metadata.
3906
- class GoogleCloudDocumentaiV1beta1InputConfig
4815
+ # Represents where the chunk starts and ends in the document.
4816
+ class GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan
3907
4817
  include Google::Apis::Core::Hashable
3908
4818
 
3909
- # The Google Cloud Storage location where the input file will be read from.
3910
- # Corresponds to the JSON property `gcsSource`
3911
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1GcsSource]
3912
- attr_accessor :gcs_source
4819
+ # Page where chunk ends in the document.
4820
+ # Corresponds to the JSON property `pageEnd`
4821
+ # @return [Fixnum]
4822
+ attr_accessor :page_end
3913
4823
 
3914
- # Required. Mimetype of the input. Current supported mimetypes are application/
3915
- # pdf, image/tiff, and image/gif. In addition, application/json type is
3916
- # supported for requests with ProcessDocumentRequest.automl_params field set.
3917
- # The JSON file needs to be in Document format.
3918
- # Corresponds to the JSON property `mimeType`
3919
- # @return [String]
3920
- attr_accessor :mime_type
4824
+ # Page where chunk starts in the document.
4825
+ # Corresponds to the JSON property `pageStart`
4826
+ # @return [Fixnum]
4827
+ attr_accessor :page_start
3921
4828
 
3922
4829
  def initialize(**args)
3923
4830
  update!(**args)
@@ -3925,25 +4832,20 @@ module Google
3925
4832
 
3926
4833
  # Update properties of this object
3927
4834
  def update!(**args)
3928
- @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
3929
- @mime_type = args[:mime_type] if args.key?(:mime_type)
4835
+ @page_end = args[:page_end] if args.key?(:page_end)
4836
+ @page_start = args[:page_start] if args.key?(:page_start)
3930
4837
  end
3931
4838
  end
3932
4839
 
3933
- # A vertex represents a 2D point in the image. NOTE: the normalized vertex
3934
- # coordinates are relative to the original image and range from 0 to 1.
3935
- class GoogleCloudDocumentaiV1beta1NormalizedVertex
4840
+ # Represents the parsed layout of a document as a collection of blocks that the
4841
+ # document is divided into.
4842
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayout
3936
4843
  include Google::Apis::Core::Hashable
3937
4844
 
3938
- # X coordinate.
3939
- # Corresponds to the JSON property `x`
3940
- # @return [Float]
3941
- attr_accessor :x
3942
-
3943
- # Y coordinate (starts from the top of the image).
3944
- # Corresponds to the JSON property `y`
3945
- # @return [Float]
3946
- attr_accessor :y
4845
+ # List of blocks in the document.
4846
+ # Corresponds to the JSON property `blocks`
4847
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock>]
4848
+ attr_accessor :blocks
3947
4849
 
3948
4850
  def initialize(**args)
3949
4851
  update!(**args)
@@ -3951,34 +4853,39 @@ module Google
3951
4853
 
3952
4854
  # Update properties of this object
3953
4855
  def update!(**args)
3954
- @x = args[:x] if args.key?(:x)
3955
- @y = args[:y] if args.key?(:y)
4856
+ @blocks = args[:blocks] if args.key?(:blocks)
3956
4857
  end
3957
4858
  end
3958
4859
 
3959
- # Contains metadata for the BatchProcessDocuments operation.
3960
- class GoogleCloudDocumentaiV1beta1OperationMetadata
4860
+ # Represents a block. A block could be one of the various types (text, table,
4861
+ # list) supported.
4862
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock
3961
4863
  include Google::Apis::Core::Hashable
3962
4864
 
3963
- # The creation time of the operation.
3964
- # Corresponds to the JSON property `createTime`
4865
+ # ID of the block.
4866
+ # Corresponds to the JSON property `blockId`
3965
4867
  # @return [String]
3966
- attr_accessor :create_time
4868
+ attr_accessor :block_id
3967
4869
 
3968
- # The state of the current batch processing.
3969
- # Corresponds to the JSON property `state`
3970
- # @return [String]
3971
- attr_accessor :state
4870
+ # Represents a list type block.
4871
+ # Corresponds to the JSON property `listBlock`
4872
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock]
4873
+ attr_accessor :list_block
3972
4874
 
3973
- # A message providing more details about the current state of processing.
3974
- # Corresponds to the JSON property `stateMessage`
3975
- # @return [String]
3976
- attr_accessor :state_message
4875
+ # Represents where the block starts and ends in the document.
4876
+ # Corresponds to the JSON property `pageSpan`
4877
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan]
4878
+ attr_accessor :page_span
3977
4879
 
3978
- # The last update time of the operation.
3979
- # Corresponds to the JSON property `updateTime`
3980
- # @return [String]
3981
- attr_accessor :update_time
4880
+ # Represents a table type block.
4881
+ # Corresponds to the JSON property `tableBlock`
4882
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock]
4883
+ attr_accessor :table_block
4884
+
4885
+ # Represents a text type block.
4886
+ # Corresponds to the JSON property `textBlock`
4887
+ # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock]
4888
+ attr_accessor :text_block
3982
4889
 
3983
4890
  def initialize(**args)
3984
4891
  update!(**args)
@@ -3986,59 +4893,49 @@ module Google
3986
4893
 
3987
4894
  # Update properties of this object
3988
4895
  def update!(**args)
3989
- @create_time = args[:create_time] if args.key?(:create_time)
3990
- @state = args[:state] if args.key?(:state)
3991
- @state_message = args[:state_message] if args.key?(:state_message)
3992
- @update_time = args[:update_time] if args.key?(:update_time)
4896
+ @block_id = args[:block_id] if args.key?(:block_id)
4897
+ @list_block = args[:list_block] if args.key?(:list_block)
4898
+ @page_span = args[:page_span] if args.key?(:page_span)
4899
+ @table_block = args[:table_block] if args.key?(:table_block)
4900
+ @text_block = args[:text_block] if args.key?(:text_block)
3993
4901
  end
3994
4902
  end
3995
4903
 
3996
- # The desired output location and metadata.
3997
- class GoogleCloudDocumentaiV1beta1OutputConfig
3998
- include Google::Apis::Core::Hashable
3999
-
4000
- # The Google Cloud Storage location where the output file will be written to.
4001
- # Corresponds to the JSON property `gcsDestination`
4002
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1GcsDestination]
4003
- attr_accessor :gcs_destination
4004
-
4005
- # The max number of pages to include into each output Document shard JSON on
4006
- # Google Cloud Storage. The valid range is [1, 100]. If not specified, the
4007
- # default value is 20. For example, for one pdf file with 100 pages, 100 parsed
4008
- # pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON
4009
- # files each containing 20 parsed pages will be written under the prefix
4010
- # OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y
4011
- # are 1-indexed page numbers. Example GCS outputs with 157 pages and
4012
- # pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-
4013
- # 150.json pages-151-to-157.json
4014
- # Corresponds to the JSON property `pagesPerShard`
4015
- # @return [Fixnum]
4016
- attr_accessor :pages_per_shard
4017
-
4904
+ # Represents a list type block.
4905
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock
4906
+ include Google::Apis::Core::Hashable
4907
+
4908
+ # List entries that constitute a list block.
4909
+ # Corresponds to the JSON property `listEntries`
4910
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry>]
4911
+ attr_accessor :list_entries
4912
+
4913
+ # Type of the list_entries (if exist). Available options are `ordered` and `
4914
+ # unordered`.
4915
+ # Corresponds to the JSON property `type`
4916
+ # @return [String]
4917
+ attr_accessor :type
4918
+
4018
4919
  def initialize(**args)
4019
4920
  update!(**args)
4020
4921
  end
4021
4922
 
4022
4923
  # Update properties of this object
4023
4924
  def update!(**args)
4024
- @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
4025
- @pages_per_shard = args[:pages_per_shard] if args.key?(:pages_per_shard)
4925
+ @list_entries = args[:list_entries] if args.key?(:list_entries)
4926
+ @type = args[:type] if args.key?(:type)
4026
4927
  end
4027
4928
  end
4028
4929
 
4029
- # Response to a single document processing request.
4030
- class GoogleCloudDocumentaiV1beta1ProcessDocumentResponse
4930
+ # Represents an entry in the list.
4931
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry
4031
4932
  include Google::Apis::Core::Hashable
4032
4933
 
4033
- # The desired input location and metadata.
4034
- # Corresponds to the JSON property `inputConfig`
4035
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1InputConfig]
4036
- attr_accessor :input_config
4037
-
4038
- # The desired output location and metadata.
4039
- # Corresponds to the JSON property `outputConfig`
4040
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta1OutputConfig]
4041
- attr_accessor :output_config
4934
+ # A list entry is a list of blocks. Repeated blocks support further hierarchies
4935
+ # and nested blocks.
4936
+ # Corresponds to the JSON property `blocks`
4937
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock>]
4938
+ attr_accessor :blocks
4042
4939
 
4043
4940
  def initialize(**args)
4044
4941
  update!(**args)
@@ -4046,25 +4943,23 @@ module Google
4046
4943
 
4047
4944
  # Update properties of this object
4048
4945
  def update!(**args)
4049
- @input_config = args[:input_config] if args.key?(:input_config)
4050
- @output_config = args[:output_config] if args.key?(:output_config)
4946
+ @blocks = args[:blocks] if args.key?(:blocks)
4051
4947
  end
4052
4948
  end
4053
4949
 
4054
- # A vertex represents a 2D point in the image. NOTE: the vertex coordinates are
4055
- # in the same scale as the original image.
4056
- class GoogleCloudDocumentaiV1beta1Vertex
4950
+ # Represents where the block starts and ends in the document.
4951
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan
4057
4952
  include Google::Apis::Core::Hashable
4058
4953
 
4059
- # X coordinate.
4060
- # Corresponds to the JSON property `x`
4954
+ # Page where block ends in the document.
4955
+ # Corresponds to the JSON property `pageEnd`
4061
4956
  # @return [Fixnum]
4062
- attr_accessor :x
4957
+ attr_accessor :page_end
4063
4958
 
4064
- # Y coordinate (starts from the top of the image).
4065
- # Corresponds to the JSON property `y`
4959
+ # Page where block starts in the document.
4960
+ # Corresponds to the JSON property `pageStart`
4066
4961
  # @return [Fixnum]
4067
- attr_accessor :y
4962
+ attr_accessor :page_start
4068
4963
 
4069
4964
  def initialize(**args)
4070
4965
  update!(**args)
@@ -4072,40 +4967,29 @@ module Google
4072
4967
 
4073
4968
  # Update properties of this object
4074
4969
  def update!(**args)
4075
- @x = args[:x] if args.key?(:x)
4076
- @y = args[:y] if args.key?(:y)
4970
+ @page_end = args[:page_end] if args.key?(:page_end)
4971
+ @page_start = args[:page_start] if args.key?(:page_start)
4077
4972
  end
4078
4973
  end
4079
4974
 
4080
- # Encodes the detailed information of a barcode.
4081
- class GoogleCloudDocumentaiV1beta2Barcode
4975
+ # Represents a table type block.
4976
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock
4082
4977
  include Google::Apis::Core::Hashable
4083
4978
 
4084
- # Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. -
4085
- # `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type.
4086
- # - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13
4087
- # type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A
4088
- # type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - `AZTEC`: 2D Aztec code
4089
- # type. - `DATABAR`: GS1 DataBar code type.
4090
- # Corresponds to the JSON property `format`
4091
- # @return [String]
4092
- attr_accessor :format
4979
+ # Body rows containing main table content.
4980
+ # Corresponds to the JSON property `bodyRows`
4981
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow>]
4982
+ attr_accessor :body_rows
4093
4983
 
4094
- # Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https:/
4095
- # /www.google.com;;'`.
4096
- # Corresponds to the JSON property `rawValue`
4984
+ # Table caption/title.
4985
+ # Corresponds to the JSON property `caption`
4097
4986
  # @return [String]
4098
- attr_accessor :raw_value
4987
+ attr_accessor :caption
4099
4988
 
4100
- # Value format describes the format of the value that a barcode encodes. The
4101
- # supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email
4102
- # address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. - `PRODUCT`:
4103
- # Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `
4104
- # WIFI`: Wifi information. - `GEO`: Geo-localization. - `CALENDAR_EVENT`:
4105
- # Calendar event. - `DRIVER_LICENSE`: Driver's license.
4106
- # Corresponds to the JSON property `valueFormat`
4107
- # @return [String]
4108
- attr_accessor :value_format
4989
+ # Header rows at the top of the table.
4990
+ # Corresponds to the JSON property `headerRows`
4991
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow>]
4992
+ attr_accessor :header_rows
4109
4993
 
4110
4994
  def initialize(**args)
4111
4995
  update!(**args)
@@ -4113,21 +4997,31 @@ module Google
4113
4997
 
4114
4998
  # Update properties of this object
4115
4999
  def update!(**args)
4116
- @format = args[:format] if args.key?(:format)
4117
- @raw_value = args[:raw_value] if args.key?(:raw_value)
4118
- @value_format = args[:value_format] if args.key?(:value_format)
5000
+ @body_rows = args[:body_rows] if args.key?(:body_rows)
5001
+ @caption = args[:caption] if args.key?(:caption)
5002
+ @header_rows = args[:header_rows] if args.key?(:header_rows)
4119
5003
  end
4120
5004
  end
4121
5005
 
4122
- # Response to an batch document processing request. This is returned in the LRO
4123
- # Operation after the operation is complete.
4124
- class GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse
5006
+ # Represents a cell in a table row.
5007
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell
4125
5008
  include Google::Apis::Core::Hashable
4126
5009
 
4127
- # Responses for each individual document.
4128
- # Corresponds to the JSON property `responses`
4129
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2ProcessDocumentResponse>]
4130
- attr_accessor :responses
5010
+ # A table cell is a list of blocks. Repeated blocks support further hierarchies
5011
+ # and nested blocks.
5012
+ # Corresponds to the JSON property `blocks`
5013
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock>]
5014
+ attr_accessor :blocks
5015
+
5016
+ # How many columns this cell spans.
5017
+ # Corresponds to the JSON property `colSpan`
5018
+ # @return [Fixnum]
5019
+ attr_accessor :col_span
5020
+
5021
+ # How many rows this cell spans.
5022
+ # Corresponds to the JSON property `rowSpan`
5023
+ # @return [Fixnum]
5024
+ attr_accessor :row_span
4131
5025
 
4132
5026
  def initialize(**args)
4133
5027
  update!(**args)
@@ -4135,23 +5029,20 @@ module Google
4135
5029
 
4136
5030
  # Update properties of this object
4137
5031
  def update!(**args)
4138
- @responses = args[:responses] if args.key?(:responses)
5032
+ @blocks = args[:blocks] if args.key?(:blocks)
5033
+ @col_span = args[:col_span] if args.key?(:col_span)
5034
+ @row_span = args[:row_span] if args.key?(:row_span)
4139
5035
  end
4140
5036
  end
4141
5037
 
4142
- # A bounding polygon for the detected image annotation.
4143
- class GoogleCloudDocumentaiV1beta2BoundingPoly
5038
+ # Represents a row in a table.
5039
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow
4144
5040
  include Google::Apis::Core::Hashable
4145
5041
 
4146
- # The bounding polygon normalized vertices.
4147
- # Corresponds to the JSON property `normalizedVertices`
4148
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2NormalizedVertex>]
4149
- attr_accessor :normalized_vertices
4150
-
4151
- # The bounding polygon vertices.
4152
- # Corresponds to the JSON property `vertices`
4153
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2Vertex>]
4154
- attr_accessor :vertices
5042
+ # A table row is a list of table cells.
5043
+ # Corresponds to the JSON property `cells`
5044
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell>]
5045
+ attr_accessor :cells
4155
5046
 
4156
5047
  def initialize(**args)
4157
5048
  update!(**args)
@@ -4159,98 +5050,31 @@ module Google
4159
5050
 
4160
5051
  # Update properties of this object
4161
5052
  def update!(**args)
4162
- @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
4163
- @vertices = args[:vertices] if args.key?(:vertices)
5053
+ @cells = args[:cells] if args.key?(:cells)
4164
5054
  end
4165
5055
  end
4166
5056
 
4167
- # Document represents the canonical document resource in Document AI. It is an
4168
- # interchange format that provides insights into documents and allows for
4169
- # collaboration between users and Document AI to iterate and optimize for
4170
- # quality.
4171
- class GoogleCloudDocumentaiV1beta2Document
5057
+ # Represents a text type block.
5058
+ class GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock
4172
5059
  include Google::Apis::Core::Hashable
4173
5060
 
4174
- # Optional. Inline document content, represented as a stream of bytes. Note: As
4175
- # with all `bytes` fields, protobuffers use a pure binary representation,
4176
- # whereas JSON representations use base64.
4177
- # Corresponds to the JSON property `content`
4178
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
4179
- # @return [String]
4180
- attr_accessor :content
4181
-
4182
- # A list of entities detected on Document.text. For document shards, entities in
4183
- # this list may cross shard boundaries.
4184
- # Corresponds to the JSON property `entities`
4185
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentEntity>]
4186
- attr_accessor :entities
4187
-
4188
- # Placeholder. Relationship among Document.entities.
4189
- # Corresponds to the JSON property `entityRelations`
4190
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentEntityRelation>]
4191
- attr_accessor :entity_relations
4192
-
4193
- # The `Status` type defines a logical error model that is suitable for different
4194
- # programming environments, including REST APIs and RPC APIs. It is used by [
4195
- # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
4196
- # data: error code, error message, and error details. You can find out more
4197
- # about this error model and how to work with it in the [API Design Guide](https:
4198
- # //cloud.google.com/apis/design/errors).
4199
- # Corresponds to the JSON property `error`
4200
- # @return [Google::Apis::DocumentaiV1beta3::GoogleRpcStatus]
4201
- attr_accessor :error
4202
-
4203
- # Labels for this document.
4204
- # Corresponds to the JSON property `labels`
4205
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentLabel>]
4206
- attr_accessor :labels
4207
-
4208
- # An IANA published [media type (MIME type)](https://www.iana.org/assignments/
4209
- # media-types/media-types.xhtml).
4210
- # Corresponds to the JSON property `mimeType`
4211
- # @return [String]
4212
- attr_accessor :mime_type
4213
-
4214
- # Visual page layout for the Document.
4215
- # Corresponds to the JSON property `pages`
4216
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentPage>]
4217
- attr_accessor :pages
4218
-
4219
- # Placeholder. Revision history of this document.
4220
- # Corresponds to the JSON property `revisions`
4221
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentRevision>]
4222
- attr_accessor :revisions
4223
-
4224
- # For a large document, sharding may be performed to produce several document
4225
- # shards. Each document shard contains this field to detail which shard it is.
4226
- # Corresponds to the JSON property `shardInfo`
4227
- # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentShardInfo]
4228
- attr_accessor :shard_info
5061
+ # A text block could further have child blocks. Repeated blocks support further
5062
+ # hierarchies and nested blocks.
5063
+ # Corresponds to the JSON property `blocks`
5064
+ # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock>]
5065
+ attr_accessor :blocks
4229
5066
 
4230
- # Optional. UTF-8 encoded text in reading order from the document.
5067
+ # Text content stored in the block.
4231
5068
  # Corresponds to the JSON property `text`
4232
5069
  # @return [String]
4233
5070
  attr_accessor :text
4234
5071
 
4235
- # Placeholder. A list of text corrections made to Document.text. This is usually
4236
- # used for annotating corrections to OCR mistakes. Text changes for a given
4237
- # revision may not overlap with each other.
4238
- # Corresponds to the JSON property `textChanges`
4239
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentTextChange>]
4240
- attr_accessor :text_changes
4241
-
4242
- # Styles for the Document.text.
4243
- # Corresponds to the JSON property `textStyles`
4244
- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta2DocumentStyle>]
4245
- attr_accessor :text_styles
4246
-
4247
- # Optional. Currently supports Google Cloud Storage URI of the form `gs://
4248
- # bucket_name/object_name`. Object versioning is not supported. For more
4249
- # information, refer to [Google Cloud Storage Request URIs](https://cloud.google.
4250
- # com/storage/docs/reference-uris).
4251
- # Corresponds to the JSON property `uri`
5072
+ # Type of the text in the block. Available options are: `paragraph`, `subtitle`,
5073
+ # `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `
5074
+ # footer`.
5075
+ # Corresponds to the JSON property `type`
4252
5076
  # @return [String]
4253
- attr_accessor :uri
5077
+ attr_accessor :type
4254
5078
 
4255
5079
  def initialize(**args)
4256
5080
  update!(**args)
@@ -4258,19 +5082,9 @@ module Google
4258
5082
 
4259
5083
  # Update properties of this object
4260
5084
  def update!(**args)
4261
- @content = args[:content] if args.key?(:content)
4262
- @entities = args[:entities] if args.key?(:entities)
4263
- @entity_relations = args[:entity_relations] if args.key?(:entity_relations)
4264
- @error = args[:error] if args.key?(:error)
4265
- @labels = args[:labels] if args.key?(:labels)
4266
- @mime_type = args[:mime_type] if args.key?(:mime_type)
4267
- @pages = args[:pages] if args.key?(:pages)
4268
- @revisions = args[:revisions] if args.key?(:revisions)
4269
- @shard_info = args[:shard_info] if args.key?(:shard_info)
5085
+ @blocks = args[:blocks] if args.key?(:blocks)
4270
5086
  @text = args[:text] if args.key?(:text)
4271
- @text_changes = args[:text_changes] if args.key?(:text_changes)
4272
- @text_styles = args[:text_styles] if args.key?(:text_styles)
4273
- @uri = args[:uri] if args.key?(:uri)
5087
+ @type = args[:type] if args.key?(:type)
4274
5088
  end
4275
5089
  end
4276
5090
 
@@ -6757,6 +7571,18 @@ module Google
6757
7571
  # @return [String]
6758
7572
  attr_accessor :name
6759
7573
 
7574
+ # Output only. Reserved for future use.
7575
+ # Corresponds to the JSON property `satisfiesPzi`
7576
+ # @return [Boolean]
7577
+ attr_accessor :satisfies_pzi
7578
+ alias_method :satisfies_pzi?, :satisfies_pzi
7579
+
7580
+ # Output only. Reserved for future use.
7581
+ # Corresponds to the JSON property `satisfiesPzs`
7582
+ # @return [Boolean]
7583
+ attr_accessor :satisfies_pzs
7584
+ alias_method :satisfies_pzs?, :satisfies_pzs
7585
+
6760
7586
  # Configuration specific to spanner-based indexing.
6761
7587
  # Corresponds to the JSON property `spannerIndexingConfig`
6762
7588
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig]
@@ -6781,6 +7607,8 @@ module Google
6781
7607
  @document_warehouse_config = args[:document_warehouse_config] if args.key?(:document_warehouse_config)
6782
7608
  @gcs_managed_config = args[:gcs_managed_config] if args.key?(:gcs_managed_config)
6783
7609
  @name = args[:name] if args.key?(:name)
7610
+ @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
7611
+ @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
6784
7612
  @spanner_indexing_config = args[:spanner_indexing_config] if args.key?(:spanner_indexing_config)
6785
7613
  @state = args[:state] if args.key?(:state)
6786
7614
  @unmanaged_dataset_config = args[:unmanaged_dataset_config] if args.key?(:unmanaged_dataset_config)
@@ -7178,8 +8006,7 @@ module Google
7178
8006
  # @return [Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentChunkedDocumentChunkChunkPageSpan]
7179
8007
  attr_accessor :page_span
7180
8008
 
7181
- # DO NOT USE. List of all parsed documents layout source blocks used to generate
7182
- # the chunk.
8009
+ # Unused.
7183
8010
  # Corresponds to the JSON property `sourceBlockIds`
7184
8011
  # @return [Array<String>]
7185
8012
  attr_accessor :source_block_ids
@@ -11132,6 +11959,18 @@ module Google
11132
11959
  # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3ProcessorVersionAlias>]
11133
11960
  attr_accessor :processor_version_aliases
11134
11961
 
11962
+ # Output only. Reserved for future use.
11963
+ # Corresponds to the JSON property `satisfiesPzi`
11964
+ # @return [Boolean]
11965
+ attr_accessor :satisfies_pzi
11966
+ alias_method :satisfies_pzi?, :satisfies_pzi
11967
+
11968
+ # Output only. Reserved for future use.
11969
+ # Corresponds to the JSON property `satisfiesPzs`
11970
+ # @return [Boolean]
11971
+ attr_accessor :satisfies_pzs
11972
+ alias_method :satisfies_pzs?, :satisfies_pzs
11973
+
11135
11974
  # Output only. The state of the processor.
11136
11975
  # Corresponds to the JSON property `state`
11137
11976
  # @return [String]
@@ -11156,6 +11995,8 @@ module Google
11156
11995
  @name = args[:name] if args.key?(:name)
11157
11996
  @process_endpoint = args[:process_endpoint] if args.key?(:process_endpoint)
11158
11997
  @processor_version_aliases = args[:processor_version_aliases] if args.key?(:processor_version_aliases)
11998
+ @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
11999
+ @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
11159
12000
  @state = args[:state] if args.key?(:state)
11160
12001
  @type = args[:type] if args.key?(:type)
11161
12002
  end
@@ -11300,6 +12141,18 @@ module Google
11300
12141
  # @return [String]
11301
12142
  attr_accessor :name
11302
12143
 
12144
+ # Output only. Reserved for future use.
12145
+ # Corresponds to the JSON property `satisfiesPzi`
12146
+ # @return [Boolean]
12147
+ attr_accessor :satisfies_pzi
12148
+ alias_method :satisfies_pzi?, :satisfies_pzi
12149
+
12150
+ # Output only. Reserved for future use.
12151
+ # Corresponds to the JSON property `satisfiesPzs`
12152
+ # @return [Boolean]
12153
+ attr_accessor :satisfies_pzs
12154
+ alias_method :satisfies_pzs?, :satisfies_pzs
12155
+
11303
12156
  # Output only. The state of the processor version.
11304
12157
  # Corresponds to the JSON property `state`
11305
12158
  # @return [String]
@@ -11321,6 +12174,8 @@ module Google
11321
12174
  @latest_evaluation = args[:latest_evaluation] if args.key?(:latest_evaluation)
11322
12175
  @model_type = args[:model_type] if args.key?(:model_type)
11323
12176
  @name = args[:name] if args.key?(:name)
12177
+ @satisfies_pzi = args[:satisfies_pzi] if args.key?(:satisfies_pzi)
12178
+ @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
11324
12179
  @state = args[:state] if args.key?(:state)
11325
12180
  end
11326
12181
  end