// Code generated by apbr generate. DO NOT EDIT.
// versions:
// 	apbr generate v1.2

//go:build !codeanalysis

package resource_model

import "github.com/google/uuid"
import "time"

type Resource struct {
	Id              *uuid.UUID          `json:"id,omitempty"`
	Version         int32               `json:"version,omitempty"`
	AuditData       *ResourceAuditData  `json:"auditData,omitempty"`
	Name            string              `json:"name,omitempty"`
	Namespace       *Namespace          `json:"namespace,omitempty"`
	Virtual         bool                `json:"virtual,omitempty"`
	Properties      map[string]Property `json:"properties,omitempty"`
	Indexes         []ResourceIndex     `json:"indexes,omitempty"`
	Types           []SubType           `json:"types,omitempty"`
	Immutable       bool                `json:"immutable,omitempty"`
	Abstract        bool                `json:"abstract,omitempty"`
	CheckReferences bool                `json:"checkReferences,omitempty"`
	DataSource      *DataSource         `json:"dataSource,omitempty"`
	Entity          *string             `json:"entity,omitempty"`
	Catalog         *string             `json:"catalog,omitempty"`
	Title           *string             `json:"title,omitempty"`
	Description     *string             `json:"description,omitempty"`
	Annotations     map[string]string   `json:"annotations,omitempty"`
}

func (s Resource) GetId() *uuid.UUID {
	return s.Id
}
func (s Resource) GetVersion() int32 {
	return s.Version
}
func (s Resource) GetAuditData() *ResourceAuditData {
	return s.AuditData
}
func (s Resource) GetName() string {
	return s.Name
}
func (s Resource) GetNamespace() *Namespace {
	return s.Namespace
}
func (s Resource) GetVirtual() bool {
	return s.Virtual
}
func (s Resource) GetProperties() map[string]Property {
	return s.Properties
}
func (s Resource) GetIndexes() []ResourceIndex {
	return s.Indexes
}
func (s Resource) GetTypes() []SubType {
	return s.Types
}
func (s Resource) GetImmutable() bool {
	return s.Immutable
}
func (s Resource) GetAbstract() bool {
	return s.Abstract
}
func (s Resource) GetCheckReferences() bool {
	return s.CheckReferences
}
func (s Resource) GetDataSource() *DataSource {
	return s.DataSource
}
func (s Resource) GetEntity() *string {
	return s.Entity
}
func (s Resource) GetCatalog() *string {
	return s.Catalog
}
func (s Resource) GetTitle() *string {
	return s.Title
}
func (s Resource) GetDescription() *string {
	return s.Description
}
func (s Resource) GetAnnotations() map[string]string {
	return s.Annotations
}

type Property struct {
	Type          ResourceType      `json:"type,omitempty"`
	TypeRef       *string           `json:"typeRef,omitempty"`
	Primary       bool              `json:"primary,omitempty"`
	Required      bool              `json:"required,omitempty"`
	Unique        bool              `json:"unique,omitempty"`
	Immutable     bool              `json:"immutable,omitempty"`
	Virtual       bool              `json:"virtual,omitempty"`
	Length        int32             `json:"length,omitempty"`
	Item          *Property         `json:"item,omitempty"`
	Reference     *string           `json:"reference,omitempty"`
	BackReference *string           `json:"backReference,omitempty"`
	DefaultValue  interface{}       `json:"defaultValue,omitempty"`
	EnumValues    []string          `json:"enumValues,omitempty"`
	ExampleValue  interface{}       `json:"exampleValue,omitempty"`
	Title         *string           `json:"title,omitempty"`
	Description   *string           `json:"description,omitempty"`
	Annotations   map[string]string `json:"annotations,omitempty"`
}

func (s Property) GetType() ResourceType {
	return s.Type
}
func (s Property) GetTypeRef() *string {
	return s.TypeRef
}
func (s Property) GetPrimary() bool {
	return s.Primary
}
func (s Property) GetRequired() bool {
	return s.Required
}
func (s Property) GetUnique() bool {
	return s.Unique
}
func (s Property) GetImmutable() bool {
	return s.Immutable
}
func (s Property) GetVirtual() bool {
	return s.Virtual
}
func (s Property) GetLength() int32 {
	return s.Length
}
func (s Property) GetItem() *Property {
	return s.Item
}
func (s Property) GetReference() *string {
	return s.Reference
}
func (s Property) GetBackReference() *string {
	return s.BackReference
}
func (s Property) GetDefaultValue() interface{} {
	return s.DefaultValue
}
func (s Property) GetEnumValues() []string {
	return s.EnumValues
}
func (s Property) GetExampleValue() interface{} {
	return s.ExampleValue
}
func (s Property) GetTitle() *string {
	return s.Title
}
func (s Property) GetDescription() *string {
	return s.Description
}
func (s Property) GetAnnotations() map[string]string {
	return s.Annotations
}

type SubType struct {
	Name        string              `json:"name,omitempty"`
	Title       *string             `json:"title,omitempty"`
	Description *string             `json:"description,omitempty"`
	Properties  map[string]Property `json:"properties,omitempty"`
}

func (s SubType) GetName() string {
	return s.Name
}
func (s SubType) GetTitle() *string {
	return s.Title
}
func (s SubType) GetDescription() *string {
	return s.Description
}
func (s SubType) GetProperties() map[string]Property {
	return s.Properties
}

type ResourceAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (s ResourceAuditData) GetCreatedBy() *string {
	return s.CreatedBy
}
func (s ResourceAuditData) GetUpdatedBy() *string {
	return s.UpdatedBy
}
func (s ResourceAuditData) GetCreatedOn() *time.Time {
	return s.CreatedOn
}
func (s ResourceAuditData) GetUpdatedOn() *time.Time {
	return s.UpdatedOn
}

type ResourceIndexProperty struct {
	Name  string         `json:"name,omitempty"`
	Order *ResourceOrder `json:"order,omitempty"`
}

func (s ResourceIndexProperty) GetName() string {
	return s.Name
}
func (s ResourceIndexProperty) GetOrder() *ResourceOrder {
	return s.Order
}

type ResourceIndex struct {
	Properties  []ResourceIndexProperty `json:"properties,omitempty"`
	IndexType   *ResourceIndexType      `json:"indexType,omitempty"`
	Unique      *bool                   `json:"unique,omitempty"`
	Annotations map[string]string       `json:"annotations,omitempty"`
}

func (s ResourceIndex) GetProperties() []ResourceIndexProperty {
	return s.Properties
}
func (s ResourceIndex) GetIndexType() *ResourceIndexType {
	return s.IndexType
}
func (s ResourceIndex) GetUnique() *bool {
	return s.Unique
}
func (s ResourceIndex) GetAnnotations() map[string]string {
	return s.Annotations
}

type ResourceType string

const (
	ResourceType_BOOL      ResourceType = "BOOL"
	ResourceType_STRING    ResourceType = "STRING"
	ResourceType_FLOAT32   ResourceType = "FLOAT32"
	ResourceType_FLOAT64   ResourceType = "FLOAT64"
	ResourceType_INT32     ResourceType = "INT32"
	ResourceType_INT64     ResourceType = "INT64"
	ResourceType_BYTES     ResourceType = "BYTES"
	ResourceType_UUID      ResourceType = "UUID"
	ResourceType_DATE      ResourceType = "DATE"
	ResourceType_TIME      ResourceType = "TIME"
	ResourceType_TIMESTAMP ResourceType = "TIMESTAMP"
	ResourceType_OBJECT    ResourceType = "OBJECT"
	ResourceType_MAP       ResourceType = "MAP"
	ResourceType_LIST      ResourceType = "LIST"
	ResourceType_REFERENCE ResourceType = "REFERENCE"
	ResourceType_ENUM      ResourceType = "ENUM"
	ResourceType_STRUCT    ResourceType = "STRUCT"
)

type ResourceOrder string

const (
	ResourceOrder_UNKNOWN ResourceOrder = "UNKNOWN"
	ResourceOrder_ASC     ResourceOrder = "ASC"
	ResourceOrder_DESC    ResourceOrder = "DESC"
)

type ResourceIndexType string

const (
	ResourceIndexType_BTREE ResourceIndexType = "BTREE"
	ResourceIndexType_HASH  ResourceIndexType = "HASH"
)
