@@ -2191,11 +2191,32 @@ class GoogleCloudDocumentaiV1Document
21912191 # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntity>]
21922192 attr_accessor :entities
21932193
2194+ # The entity revision id that `document.entities` field is based on. If this
2195+ # field is set and `entities_revisions` is not empty, the entities in `document.
2196+ # entities` field are the entities in the entity revision with this id and `
2197+ # document.entity_validation_output` field is the `entity_validation_output`
2198+ # field in this entity revision.
2199+ # Corresponds to the JSON property `entitiesRevisionId`
2200+ # @return [String]
2201+ attr_accessor :entities_revision_id
2202+
2203+ # A list of entity revisions. The entity revisions are appended to the document
2204+ # in the processing order. This field can be used for comparing the entity
2205+ # extraction results at different stages of the processing.
2206+ # Corresponds to the JSON property `entitiesRevisions`
2207+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntitiesRevision>]
2208+ attr_accessor :entities_revisions
2209+
21942210 # Placeholder. Relationship among Document.entities.
21952211 # Corresponds to the JSON property `entityRelations`
21962212 # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntityRelation>]
21972213 attr_accessor :entity_relations
21982214
2215+ # The output of the validation given the document and the validation rules.
2216+ # Corresponds to the JSON property `entityValidationOutput`
2217+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntityValidationOutput]
2218+ attr_accessor :entity_validation_output
2219+
21992220 # The `Status` type defines a logical error model that is suitable for different
22002221 # programming environments, including REST APIs and RPC APIs. It is used by [
22012222 # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
@@ -2264,7 +2285,10 @@ def update!(**args)
22642285 @docid = args [ :docid ] if args . key? ( :docid )
22652286 @document_layout = args [ :document_layout ] if args . key? ( :document_layout )
22662287 @entities = args [ :entities ] if args . key? ( :entities )
2288+ @entities_revision_id = args [ :entities_revision_id ] if args . key? ( :entities_revision_id )
2289+ @entities_revisions = args [ :entities_revisions ] if args . key? ( :entities_revisions )
22672290 @entity_relations = args [ :entity_relations ] if args . key? ( :entity_relations )
2291+ @entity_validation_output = args [ :entity_validation_output ] if args . key? ( :entity_validation_output )
22682292 @error = args [ :error ] if args . key? ( :error )
22692293 @mime_type = args [ :mime_type ] if args . key? ( :mime_type )
22702294 @pages = args [ :pages ] if args . key? ( :pages )
@@ -2677,6 +2701,37 @@ def update!(**args)
26772701 end
26782702 end
26792703
2704+ # Entity revision.
2705+ class GoogleCloudDocumentaiV1DocumentEntitiesRevision
2706+ include Google ::Apis ::Core ::Hashable
2707+
2708+ # The entities in this revision.
2709+ # Corresponds to the JSON property `entities`
2710+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntity>]
2711+ attr_accessor :entities
2712+
2713+ # The output of the validation given the document and the validation rules.
2714+ # Corresponds to the JSON property `entityValidationOutput`
2715+ # @return [Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntityValidationOutput]
2716+ attr_accessor :entity_validation_output
2717+
2718+ # The revision id.
2719+ # Corresponds to the JSON property `revisionId`
2720+ # @return [String]
2721+ attr_accessor :revision_id
2722+
2723+ def initialize ( **args )
2724+ update! ( **args )
2725+ end
2726+
2727+ # Update properties of this object
2728+ def update! ( **args )
2729+ @entities = args [ :entities ] if args . key? ( :entities )
2730+ @entity_validation_output = args [ :entity_validation_output ] if args . key? ( :entity_validation_output )
2731+ @revision_id = args [ :revision_id ] if args . key? ( :revision_id )
2732+ end
2733+ end
2734+
26802735 # An entity that could be a phrase in the text or a property that belongs to the
26812736 # document. It is a known entity type, such as a person, an organization, or
26822737 # location.
@@ -2907,6 +2962,70 @@ def update!(**args)
29072962 end
29082963 end
29092964
2965+ # The output of the validation given the document and the validation rules.
2966+ class GoogleCloudDocumentaiV1DocumentEntityValidationOutput
2967+ include Google ::Apis ::Core ::Hashable
2968+
2969+ # The overall result of the validation, true if all applicable rules are valid.
2970+ # Corresponds to the JSON property `passAllRules`
2971+ # @return [Boolean]
2972+ attr_accessor :pass_all_rules
2973+ alias_method :pass_all_rules? , :pass_all_rules
2974+
2975+ # The result of each validation rule.
2976+ # Corresponds to the JSON property `validationResults`
2977+ # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentEntityValidationOutputValidationResult>]
2978+ attr_accessor :validation_results
2979+
2980+ def initialize ( **args )
2981+ update! ( **args )
2982+ end
2983+
2984+ # Update properties of this object
2985+ def update! ( **args )
2986+ @pass_all_rules = args [ :pass_all_rules ] if args . key? ( :pass_all_rules )
2987+ @validation_results = args [ :validation_results ] if args . key? ( :validation_results )
2988+ end
2989+ end
2990+
2991+ # Validation result for a single validation rule.
2992+ class GoogleCloudDocumentaiV1DocumentEntityValidationOutputValidationResult
2993+ include Google ::Apis ::Core ::Hashable
2994+
2995+ # The description of the validation rule.
2996+ # Corresponds to the JSON property `ruleDescription`
2997+ # @return [String]
2998+ attr_accessor :rule_description
2999+
3000+ # The name of the validation rule.
3001+ # Corresponds to the JSON property `ruleName`
3002+ # @return [String]
3003+ attr_accessor :rule_name
3004+
3005+ # The detailed information of the running the validation process using the
3006+ # entity from the document based on the validation rule.
3007+ # Corresponds to the JSON property `validationDetails`
3008+ # @return [String]
3009+ attr_accessor :validation_details
3010+
3011+ # The result of the validation rule.
3012+ # Corresponds to the JSON property `validationResultType`
3013+ # @return [String]
3014+ attr_accessor :validation_result_type
3015+
3016+ def initialize ( **args )
3017+ update! ( **args )
3018+ end
3019+
3020+ # Update properties of this object
3021+ def update! ( **args )
3022+ @rule_description = args [ :rule_description ] if args . key? ( :rule_description )
3023+ @rule_name = args [ :rule_name ] if args . key? ( :rule_name )
3024+ @validation_details = args [ :validation_details ] if args . key? ( :validation_details )
3025+ @validation_result_type = args [ :validation_result_type ] if args . key? ( :validation_result_type )
3026+ end
3027+ end
3028+
29103029 # Config that controls the output of documents. All documents will be written as
29113030 # a JSON file.
29123031 class GoogleCloudDocumentaiV1DocumentOutputConfig
0 commit comments