Resource: DocumentSchema
A document schema used to define document structure.
| JSON representation | 
|---|
{
  "name": string,
  "displayName": string,
  "propertyDefinitions": [
    {
      object ( | 
              
| Fields | |
|---|---|
name | 
                
                   
 The resource name of the document schema. Format: projects/{projectNumber}/locations/{location}/documentSchemas/{document_schema_id}. The name is ignored when creating a document schema.  | 
              
displayName | 
                
                   
 Required. name of the schema given by the user. Must be unique per project.  | 
              
propertyDefinitions[] | 
                
                   
 Document details.  | 
              
documentIsFolder | 
                
                   
 Document type, true refers the document is a folder, otherwise it is a typical document.  | 
              
updateTime | 
                
                   
 Output only. The time when the document schema is last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples:   | 
              
createTime | 
                
                   
 Output only. The time when the document schema is created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples:   | 
              
description | 
                
                   
 Schema description.  | 
              
PropertyDefinition
Defines the metadata for a schema property.
| JSON representation | 
|---|
{ "name": string, "displayName": string, "isRepeatable": boolean, "isFilterable": boolean, "isSearchable": boolean, "isMetadata": boolean, "isRequired": boolean, "retrievalImportance": enum (  | 
              
| Fields | |
|---|---|
name | 
                
                   
 Required. The name of the metadata property. Must be unique within a document schema and is case insensitive. Names must be non-blank, start with a letter, and can contain alphanumeric characters and: /, :, -, _, and .  | 
              
displayName | 
                
                   
 The display-name for the property, used for front-end.  | 
              
isRepeatable | 
                
                   
 Whether the property can have multiple values.  | 
              
isFilterable | 
                
                   
 Whether the property can be filtered. If this is a sub-property, all the parent properties must be marked filterable.  | 
              
isSearchable | 
                
                   
 Indicates that the property should be included in a global search.  | 
              
isMetadata | 
                
                   
 Whether the property is user supplied metadata. This out-of-the box placeholder setting can be used to tag derived properties. Its value and interpretation logic should be implemented by API user.  | 
              
isRequired | 
                
                   
 Whether the property is mandatory. Default is 'false', i.e. populating property value can be skipped. If 'true' then user must populate the value for this property.  | 
              
retrievalImportance | 
                
                   
 The retrieval importance of the property during search.  | 
              
schemaSources[] | 
                
                   
 The mapping information between this property to another schema source.  | 
              
Union field value_type_options. Type of the property. value_type_options can be only one of the following: | 
              |
integerTypeOptions | 
                
                   
 Integer property.  | 
              
floatTypeOptions | 
                
                   
 Float property.  | 
              
textTypeOptions | 
                
                   
 text/string property.  | 
              
propertyTypeOptions | 
                
                   
 Nested structured data property.  | 
              
enumTypeOptions | 
                
                   
 Enum/categorical property.  | 
              
dateTimeTypeOptions | 
                
                   
 date time property. It is not supported by CMEK compliant deployment.  | 
              
mapTypeOptions | 
                
                   
 Map property.  | 
              
timestampTypeOptions | 
                
                   
 timestamp property. It is not supported by CMEK compliant deployment.  | 
              
RetrievalImportance
Stores the retrieval importance.
| Enums | |
|---|---|
RETRIEVAL_IMPORTANCE_UNSPECIFIED | 
                No importance specified. Default medium importance. | 
HIGHEST | 
                Highest importance. | 
HIGHER | 
                Higher importance. | 
HIGH | 
                High importance. | 
MEDIUM | 
                Medium importance. | 
LOW | 
                Low importance (negative). | 
LOWEST | 
                Lowest importance (negative). | 
IntegerTypeOptions
This type has no fields.
Configurations for an integer property.
FloatTypeOptions
This type has no fields.
Configurations for a float property.
TextTypeOptions
This type has no fields.
Configurations for a text property.
PropertyTypeOptions
Configurations for a nested structured data property.
| JSON representation | 
|---|
{
  "propertyDefinitions": [
    {
      object ( | 
              
| Fields | |
|---|---|
propertyDefinitions[] | 
                
                   
 Required. List of property definitions.  | 
              
EnumTypeOptions
Configurations for an enum/categorical property.
| JSON representation | 
|---|
{ "possibleValues": [ string ], "validationCheckDisabled": boolean }  | 
              
| Fields | |
|---|---|
possibleValues[] | 
                
                   
 Required. List of possible enum values.  | 
              
validationCheckDisabled | 
                
                   
 Make sure the Enum property value provided in the document is in the possile value list during document creation. The validation check runs by default.  | 
              
DateTimeTypeOptions
This type has no fields.
Configurations for a date time property.
MapTypeOptions
This type has no fields.
Configurations for a Map property.
TimestampTypeOptions
This type has no fields.
Configurations for a timestamp property.
SchemaSource
The schema source information.
| JSON representation | 
|---|
{ "name": string, "processorType": string }  | 
              
| Fields | |
|---|---|
name | 
                
                   
 The schema name in the source.  | 
              
processorType | 
                
                   
 The Doc AI processor type name.  | 
              
Methods | 
            |
|---|---|
                
 | 
              Creates a document schema. | 
                
 | 
              Deletes a document schema. | 
                
 | 
              Gets a document schema. | 
                
 | 
              Lists document schemas. | 
                
 | 
              Updates a Document Schema. |