Skip to main content

entity.identity.schema_builder

SchemaBuilder Objects

class SchemaBuilder()

Is a builder pattern for constructing schema instances.

__init__

def __init__(display_name: str, schema_type: str, version: str,
description: str, config_data: ConfigData) -> None

Creates a new instance of SchemaBuilder with initial values.

add_string_attribute

def add_string_attribute(name: str, technical_name: str, description: str,
required: bool) -> SchemaBuilder

Adds a string attribute descriptor to the schema builder.

add_integer_attribute

def add_integer_attribute(name: str, technical_name: str, description: str,
required: bool) -> SchemaBuilder

Adds an integer attribute descriptor to the schema builder.

add_decimal_attribute

def add_decimal_attribute(name: str, technical_name: str, description: str,
required: bool) -> SchemaBuilder

Adds a decimal attribute descriptor to the schema builder.

add_boolean_attribute

def add_boolean_attribute(name: str, technical_name: str, description: str,
required: bool) -> SchemaBuilder

Adds a boolean attribute descriptor to the schema builder.

add_date_attribute

def add_date_attribute(name: str, technical_name: str, description: str,
required: bool) -> SchemaBuilder

Adds a date attribute descriptor to the schema builder.

add_string_enum_attribute

def add_string_enum_attribute(name: str, technical_name: str, description: str,
required: bool,
enumeration: List[str]) -> SchemaBuilder

Adds a string enum attribute descriptor to the schema builder.

add_integer_enum_attribute

def add_integer_enum_attribute(name: str, technical_name: str,
description: str, required: bool,
enumeration: List[int]) -> SchemaBuilder

Adds an integer enum attribute descriptor to the schema builder.

add_decimal_enum_attribute

def add_decimal_enum_attribute(name: str, technical_name: str,
description: str, required: bool,
enumeration: List[float]) -> SchemaBuilder

Adds a decimal enum attribute descriptor to the schema builder.

add_datetime_attribute

def add_datetime_attribute(name: str, technical_name: str, description: str,
required: bool) -> SchemaBuilder

Adds a datetime attribute descriptor to the schema builder.

build

def build() -> Schema

Creates a schema using the configured attributes.