Reference documentation and code samples for the Google Cloud Document Ai V1 Client class OccurrenceType.
Types of occurrences of the entity type in the document. This
represents the number of instances, not mentions, of an entity.
For example, a bank statement might only have one
account_number, but this account number can be mentioned in several
places on the document. In this case, the account_number is
considered a REQUIRED_ONCE entity type. If, on the other hand, we
expect a bank statement to contain the status of multiple different
accounts for the customers, the occurrence type is set to
REQUIRED_MULTIPLE.
Protobuf type google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Document Ai V1 Client - Class OccurrenceType (2.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.0 (latest)](/php/docs/reference/cloud-document-ai/latest/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [2.2.2](/php/docs/reference/cloud-document-ai/2.2.2/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [2.1.3](/php/docs/reference/cloud-document-ai/2.1.3/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [2.0.0](/php/docs/reference/cloud-document-ai/2.0.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.14.0](/php/docs/reference/cloud-document-ai/1.14.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.13.1](/php/docs/reference/cloud-document-ai/1.13.1/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.12.2](/php/docs/reference/cloud-document-ai/1.12.2/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.9.0](/php/docs/reference/cloud-document-ai/1.9.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.8.2](/php/docs/reference/cloud-document-ai/1.8.2/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.7.0](/php/docs/reference/cloud-document-ai/1.7.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.6.0](/php/docs/reference/cloud-document-ai/1.6.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.5.0](/php/docs/reference/cloud-document-ai/1.5.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.4.0](/php/docs/reference/cloud-document-ai/1.4.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.3.0](/php/docs/reference/cloud-document-ai/1.3.0/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.2.2](/php/docs/reference/cloud-document-ai/1.2.2/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.1.1](/php/docs/reference/cloud-document-ai/1.1.1/V1.DocumentSchema.EntityType.Property.OccurrenceType)\n- [1.0.1](/php/docs/reference/cloud-document-ai/1.0.1/V1.DocumentSchema.EntityType.Property.OccurrenceType) \nReference documentation and code samples for the Google Cloud Document Ai V1 Client class OccurrenceType.\n\nTypes of occurrences of the entity type in the document. This\nrepresents the number of instances, not mentions, of an entity.\n\nFor example, a bank statement might only have one\n`account_number`, but this account number can be mentioned in several\nplaces on the document. In this case, the `account_number` is\nconsidered a `REQUIRED_ONCE` entity type. If, on the other hand, we\nexpect a bank statement to contain the status of multiple different\naccounts for the customers, the occurrence type is set to\n`REQUIRED_MULTIPLE`.\n\nProtobuf type `google.cloud.documentai.v1.DocumentSchema.EntityType.Property.OccurrenceType`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DocumentAI \\\\ V1 \\\\ DocumentSchema \\\\ EntityType \\\\ Property\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### OCCURRENCE_TYPE_UNSPECIFIED\n\n Value: 0\n\nUnspecified occurrence type.\n\nGenerated from protobuf enum `OCCURRENCE_TYPE_UNSPECIFIED = 0;`\n\n### OPTIONAL_ONCE\n\n Value: 1\n\nThere will be zero or one instance of this entity type. The same\nentity instance may be mentioned multiple times.\n\nGenerated from protobuf enum `OPTIONAL_ONCE = 1;`\n\n### OPTIONAL_MULTIPLE\n\n Value: 2\n\nThe entity type will appear zero or multiple times.\n\nGenerated from protobuf enum `OPTIONAL_MULTIPLE = 2;`\n\n### REQUIRED_ONCE\n\n Value: 3\n\nThe entity type will only appear exactly once. The same\nentity instance may be mentioned multiple times.\n\nGenerated from protobuf enum `REQUIRED_ONCE = 3;`\n\n### REQUIRED_MULTIPLE\n\n Value: 4\n\nThe entity type will appear once or more times.\n\nGenerated from protobuf enum `REQUIRED_MULTIPLE = 4;`"]]