REST Resource: projects.locations.documentSchemas

Resource: DocumentSchema

A document schema used to define document structure.

JSON representation
{
  "name": string,
  "displayName": string,
  "propertyDefinitions": [
    {
      object (PropertyDefinition)
    }
  ],
  "documentIsFolder": boolean,
  "updateTime": string,
  "createTime": string,
  "description": string
}
Fields
name

string

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

string

Required. name of the schema given by the user. Must be unique per project.

propertyDefinitions[]

object (PropertyDefinition)

Document details.

documentIsFolder

boolean

Document type, true refers the document is a folder, otherwise it is a typical document.

updateTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

createTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

description

string

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 (RetrievalImportance),
  "schemaSources": [
    {
      object (SchemaSource)
    }
  ],

  // Union field value_type_options can be only one of the following:
  "integerTypeOptions": {
    object (IntegerTypeOptions)
  },
  "floatTypeOptions": {
    object (FloatTypeOptions)
  },
  "textTypeOptions": {
    object (TextTypeOptions)
  },
  "propertyTypeOptions": {
    object (PropertyTypeOptions)
  },
  "enumTypeOptions": {
    object (EnumTypeOptions)
  },
  "dateTimeTypeOptions": {
    object (DateTimeTypeOptions)
  },
  "mapTypeOptions": {
    object (MapTypeOptions)
  },
  "timestampTypeOptions": {
    object (TimestampTypeOptions)
  }
  // End of list of possible types for union field value_type_options.
}
Fields
name

string

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

string

The display-name for the property, used for front-end.

isRepeatable

boolean

Whether the property can have multiple values.

isFilterable

boolean

Whether the property can be filtered. If this is a sub-property, all the parent properties must be marked filterable.

isSearchable

boolean

Indicates that the property should be included in a global search.

isMetadata

boolean

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

boolean

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

enum (RetrievalImportance)

The retrieval importance of the property during search.

schemaSources[]

object (SchemaSource)

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

object (IntegerTypeOptions)

Integer property.

floatTypeOptions

object (FloatTypeOptions)

Float property.

textTypeOptions

object (TextTypeOptions)

text/string property.

propertyTypeOptions

object (PropertyTypeOptions)

Nested structured data property.

enumTypeOptions

object (EnumTypeOptions)

Enum/categorical property.

dateTimeTypeOptions

object (DateTimeTypeOptions)

date time property. It is not supported by CMEK compliant deployment.

mapTypeOptions

object (MapTypeOptions)

Map property.

timestampTypeOptions

object (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 (PropertyDefinition)
    }
  ]
}
Fields
propertyDefinitions[]

object (PropertyDefinition)

Required. List of property definitions.

EnumTypeOptions

Configurations for an enum/categorical property.

JSON representation
{
  "possibleValues": [
    string
  ],
  "validationCheckDisabled": boolean
}
Fields
possibleValues[]

string

Required. List of possible enum values.

validationCheckDisabled

boolean

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

string

The schema name in the source.

processorType

string

The Doc AI processor type name.

Methods

create

Creates a document schema.

delete

Deletes a document schema.

get

Gets a document schema.

list

Lists document schemas.

patch

Updates a Document Schema.