Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.44 KB

property-schema.md

File metadata and controls

36 lines (25 loc) · 1.44 KB

Property Schema

A Property Schema object defines a database property's configuration including its type and type-specific settings. Common property types include title, rich_text, number, select, multi_select, date, people, files, checkbox, url, email, phone_number, formula, relation, rollup, created_time, created_by, last_edited_time, last_edited_by, and status.

This model accepts additional fields of type Object.

Structure

PropertySchema

Fields

Name Type Tags Description Getter Setter
Id String Optional The ID of the property. String getId() setId(String id)
Name String Optional The name of the property. String getName() setName(String name)
Type Type31 Optional The type of property. Type31 getType() setType(Type31 type)
AdditionalProperties Map<String, Object> Optional - Object getAdditionalProperty(String key) additionalProperty(String key, Object value)

Example

import com.notion.api.ApiHelper;
import com.notion.api.models.PropertySchema;
import com.notion.api.models.Type31;
import java.io.IOException;

PropertySchema propertySchema = new PropertySchema.Builder()
    .id("id8")
    .name("name8")
    .type(Type31.LAST_EDITED_BY)
.additionalProperty("exampleAdditionalProperty", ApiHelper.deserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"))
    .build();