@@ -2546,6 +2546,177 @@ def update!(**args)
25462546 end
25472547 end
25482548
2549+ # The schema defines the output of the processed document by a processor.
2550+ class GoogleCloudDocumentaiV1DocumentSchema
2551+ include Google ::Apis ::Core ::Hashable
2552+
2553+ # Description of the schema.
2554+ # Corresponds to the JSON property `description`
2555+ # @return [String]
2556+ attr_accessor :description
2557+
2558+ # Display name to show to users.
2559+ # Corresponds to the JSON property `displayName`
2560+ # @return [String]
2561+ attr_accessor :display_name
2562+
2563+ # Entity types of the schema.
2564+ # Corresponds to the JSON property `entityTypes`
2565+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchemaEntityType>]
2566+ attr_accessor :entity_types
2567+
2568+ # Metadata for global schema behavior.
2569+ # Corresponds to the JSON property `metadata`
2570+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchemaMetadata]
2571+ attr_accessor :metadata
2572+
2573+ def initialize ( **args )
2574+ update! ( **args )
2575+ end
2576+
2577+ # Update properties of this object
2578+ def update! ( **args )
2579+ @description = args [ :description ] if args . key? ( :description )
2580+ @display_name = args [ :display_name ] if args . key? ( :display_name )
2581+ @entity_types = args [ :entity_types ] if args . key? ( :entity_types )
2582+ @metadata = args [ :metadata ] if args . key? ( :metadata )
2583+ end
2584+ end
2585+
2586+ # EntityType is the wrapper of a label of the corresponding model with detailed
2587+ # attributes and limitations for entity-based processors. Multiple types can
2588+ # also compose a dependency tree to represent nested types.
2589+ class GoogleCloudDocumentaiV1DocumentSchemaEntityType
2590+ include Google ::Apis ::Core ::Hashable
2591+
2592+ # The entity type that this type is derived from. For now, one and only one
2593+ # should be set.
2594+ # Corresponds to the JSON property `baseTypes`
2595+ # @return [Array<String>]
2596+ attr_accessor :base_types
2597+
2598+ # User defined name for the type.
2599+ # Corresponds to the JSON property `displayName`
2600+ # @return [String]
2601+ attr_accessor :display_name
2602+
2603+ # Defines the a list of enum values.
2604+ # Corresponds to the JSON property `enumValues`
2605+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues]
2606+ attr_accessor :enum_values
2607+
2608+ # Name of the type. It must be unique within the schema file and cannot be a '
2609+ # Common Type'. Besides that we use the following naming conventions: - *use
2610+ # snake_casing* - name matching is case-insensitive - Maximum 64 characters. -
2611+ # Must start with a letter. - Allowed characters: ASCII letters [a-z0-9_-]. (For
2612+ # backward compatibility internal infrastructure and tooling can handle any
2613+ # ascii character) - The '/' is sometimes used to denote a property of a type.
2614+ # For example line_item/amount. This convention is deprecated, but will still be
2615+ # honored for backward compatibility.
2616+ # Corresponds to the JSON property `name`
2617+ # @return [String]
2618+ attr_accessor :name
2619+
2620+ # Describing the nested structure, or composition of an entity.
2621+ # Corresponds to the JSON property `properties`
2622+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty>]
2623+ attr_accessor :properties
2624+
2625+ def initialize ( **args )
2626+ update! ( **args )
2627+ end
2628+
2629+ # Update properties of this object
2630+ def update! ( **args )
2631+ @base_types = args [ :base_types ] if args . key? ( :base_types )
2632+ @display_name = args [ :display_name ] if args . key? ( :display_name )
2633+ @enum_values = args [ :enum_values ] if args . key? ( :enum_values )
2634+ @name = args [ :name ] if args . key? ( :name )
2635+ @properties = args [ :properties ] if args . key? ( :properties )
2636+ end
2637+ end
2638+
2639+ # Defines the a list of enum values.
2640+ class GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues
2641+ include Google ::Apis ::Core ::Hashable
2642+
2643+ # The individual values that this enum values type can include.
2644+ # Corresponds to the JSON property `values`
2645+ # @return [Array<String>]
2646+ attr_accessor :values
2647+
2648+ def initialize ( **args )
2649+ update! ( **args )
2650+ end
2651+
2652+ # Update properties of this object
2653+ def update! ( **args )
2654+ @values = args [ :values ] if args . key? ( :values )
2655+ end
2656+ end
2657+
2658+ # Defines properties that can be part of the entity type.
2659+ class GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty
2660+ include Google ::Apis ::Core ::Hashable
2661+
2662+ # The name of the property. Follows the same guidelines as the EntityType name.
2663+ # Corresponds to the JSON property `name`
2664+ # @return [String]
2665+ attr_accessor :name
2666+
2667+ # Occurrence type limits the number of instances an entity type appears in the
2668+ # document.
2669+ # Corresponds to the JSON property `occurrenceType`
2670+ # @return [String]
2671+ attr_accessor :occurrence_type
2672+
2673+ # A reference to the value type of the property. This type is subject to the
2674+ # same conventions as the `Entity.base_types` field.
2675+ # Corresponds to the JSON property `valueType`
2676+ # @return [String]
2677+ attr_accessor :value_type
2678+
2679+ def initialize ( **args )
2680+ update! ( **args )
2681+ end
2682+
2683+ # Update properties of this object
2684+ def update! ( **args )
2685+ @name = args [ :name ] if args . key? ( :name )
2686+ @occurrence_type = args [ :occurrence_type ] if args . key? ( :occurrence_type )
2687+ @value_type = args [ :value_type ] if args . key? ( :value_type )
2688+ end
2689+ end
2690+
2691+ # Metadata for global schema behavior.
2692+ class GoogleCloudDocumentaiV1DocumentSchemaMetadata
2693+ include Google ::Apis ::Core ::Hashable
2694+
2695+ # If true, on a given page, there can be multiple `document` annotations
2696+ # covering it.
2697+ # Corresponds to the JSON property `documentAllowMultipleLabels`
2698+ # @return [Boolean]
2699+ attr_accessor :document_allow_multiple_labels
2700+ alias_method :document_allow_multiple_labels? , :document_allow_multiple_labels
2701+
2702+ # If true, a `document` entity type can be applied to subdocument ( splitting).
2703+ # Otherwise, it can only be applied to the entire document (classification).
2704+ # Corresponds to the JSON property `documentSplitter`
2705+ # @return [Boolean]
2706+ attr_accessor :document_splitter
2707+ alias_method :document_splitter? , :document_splitter
2708+
2709+ def initialize ( **args )
2710+ update! ( **args )
2711+ end
2712+
2713+ # Update properties of this object
2714+ def update! ( **args )
2715+ @document_allow_multiple_labels = args [ :document_allow_multiple_labels ] if args . key? ( :document_allow_multiple_labels )
2716+ @document_splitter = args [ :document_splitter ] if args . key? ( :document_splitter )
2717+ end
2718+ end
2719+
25492720 # For a large document, sharding may be performed to produce several document
25502721 # shards. Each document shard contains this field to detail which shard it is.
25512722 class GoogleCloudDocumentaiV1DocumentShardInfo
@@ -3429,6 +3600,11 @@ def update!(**args)
34293600 class GoogleCloudDocumentaiV1ReviewDocumentRequest
34303601 include Google ::Apis ::Core ::Hashable
34313602
3603+ # The schema defines the output of the processed document by a processor.
3604+ # Corresponds to the JSON property `documentSchema`
3605+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentSchema]
3606+ attr_accessor :document_schema
3607+
34323608 # Whether the validation should be performed on the ad-hoc review request.
34333609 # Corresponds to the JSON property `enableSchemaValidation`
34343610 # @return [Boolean]
@@ -3454,6 +3630,7 @@ def initialize(**args)
34543630
34553631 # Update properties of this object
34563632 def update! ( **args )
3633+ @document_schema = args [ :document_schema ] if args . key? ( :document_schema )
34573634 @enable_schema_validation = args [ :enable_schema_validation ] if args . key? ( :enable_schema_validation )
34583635 @inline_document = args [ :inline_document ] if args . key? ( :inline_document )
34593636 @priority = args [ :priority ] if args . key? ( :priority )
@@ -3464,18 +3641,31 @@ def update!(**args)
34643641 class GoogleCloudDocumentaiV1ReviewDocumentResponse
34653642 include Google ::Apis ::Core ::Hashable
34663643
3467- # The Cloud Storage uri for the human reviewed document.
3644+ # The Cloud Storage uri for the human reviewed document if the review is
3645+ # succeeded.
34683646 # Corresponds to the JSON property `gcsDestination`
34693647 # @return [String]
34703648 attr_accessor :gcs_destination
34713649
3650+ # The reason why the review is rejected by reviewer.
3651+ # Corresponds to the JSON property `rejectionReason`
3652+ # @return [String]
3653+ attr_accessor :rejection_reason
3654+
3655+ # The state of the review operation.
3656+ # Corresponds to the JSON property `state`
3657+ # @return [String]
3658+ attr_accessor :state
3659+
34723660 def initialize ( **args )
34733661 update! ( **args )
34743662 end
34753663
34763664 # Update properties of this object
34773665 def update! ( **args )
34783666 @gcs_destination = args [ :gcs_destination ] if args . key? ( :gcs_destination )
3667+ @rejection_reason = args [ :rejection_reason ] if args . key? ( :rejection_reason )
3668+ @state = args [ :state ] if args . key? ( :state )
34793669 end
34803670 end
34813671
@@ -7621,18 +7811,31 @@ def update!(**args)
76217811 class GoogleCloudDocumentaiV1beta3ReviewDocumentResponse
76227812 include Google ::Apis ::Core ::Hashable
76237813
7624- # The Cloud Storage uri for the human reviewed document.
7814+ # The Cloud Storage uri for the human reviewed document if the review is
7815+ # succeeded.
76257816 # Corresponds to the JSON property `gcsDestination`
76267817 # @return [String]
76277818 attr_accessor :gcs_destination
76287819
7820+ # The reason why the review is rejected by reviewer.
7821+ # Corresponds to the JSON property `rejectionReason`
7822+ # @return [String]
7823+ attr_accessor :rejection_reason
7824+
7825+ # The state of the review operation.
7826+ # Corresponds to the JSON property `state`
7827+ # @return [String]
7828+ attr_accessor :state
7829+
76297830 def initialize ( **args )
76307831 update! ( **args )
76317832 end
76327833
76337834 # Update properties of this object
76347835 def update! ( **args )
76357836 @gcs_destination = args [ :gcs_destination ] if args . key? ( :gcs_destination )
7837+ @rejection_reason = args [ :rejection_reason ] if args . key? ( :rejection_reason )
7838+ @state = args [ :state ] if args . key? ( :state )
76367839 end
76377840 end
76387841
0 commit comments