package rest

type DescribeGlobalResult struct {
	Encoding     string                 `json:"encoding"`
	MaxBatchSize int                    `json:"maxBatchSize"`
	SObjects     []DescribeGlobalObject `json:"sobjects"`
}

type DescribeGlobalObject struct {
	Activateable          bool              `json:"activateable"`
	AssociateEntityType   interface{}       `json:"associateEntityType"`
	AssociateParentEntity interface{}       `json:"associateParentEntity"`
	Createable            bool              `json:"createable"`
	Custom                bool              `json:"custom"`
	CustomSetting         bool              `json:"customSetting"`
	Deletable             bool              `json:"deletable"`
	DeprecatedAndHidden   bool              `json:"deprecatedAndHidden"`
	FeedEnabled           bool              `json:"feedEnabled"`
	HasSubtypes           bool              `json:"hasSubtypes"`
	IsSubtype             bool              `json:"isSubtype"`
	KeyPrefix             string            `json:"keyPrefix"`
	Label                 string            `json:"label"`
	LabelPlural           string            `json:"labelPlural"`
	Layoutable            bool              `json:"layoutable"`
	Mergeable             bool              `json:"mergeable"`
	MruEnabled            bool              `json:"mruEnabled"`
	Name                  string            `json:"name"`
	IsSystem              bool              `json:"isSystem"`
	Queryable             bool              `json:"queryable"`
	Replicateable         bool              `json:"replicateable"`
	Retrieveable          bool              `json:"retrieveable"`
	Searchable            bool              `json:"searchable"`
	TableType             string            `json:"tableType,omitempty"`
	Triggerable           bool              `json:"triggerable"`
	Undeletable           bool              `json:"undeletable"`
	Updateable            bool              `json:"updateable"`
	Urls                  map[string]string `json:"urls"`
}

type DescribeSObjectResult struct {
	ActionOverrides       []interface{}       `json:"actionOverrides"`
	Activateable          bool                `json:"activateable"`
	AssociateEntityType   interface{}         `json:"associateEntityType"`
	AssociateParentEntity interface{}         `json:"associateParentEntity"`
	ChildRelationships    []ChildRelationship `json:"childRelationships"`
	CompactLayoutable     bool                `json:"compactLayoutable"`
	Createable            bool                `json:"createable"`
	Custom                bool                `json:"custom"`
	CustomSetting         bool                `json:"customSetting"`
	Deletable             bool                `json:"deletable"`
	DeprecatedAndHidden   bool                `json:"deprecatedAndHidden"`
	FeedEnabled           bool                `json:"feedEnabled"`
	Fields                []SObjectField      `json:"fields"`
	HasSubtypes           bool                `json:"hasSubtypes"`
	IsSubtype             bool                `json:"isSubtype"`
	KeyPrefix             string              `json:"keyPrefix"`
	Label                 string              `json:"label"`
	LabelPlural           string              `json:"labelPlural"`
	Layoutable            bool                `json:"layoutable"`
	ListFields            []string            `json:"listFields,omitempty"`
	PathField             string              `json:"pathField,omitempty"`
	Listviewable          interface{}         `json:"listviewable"`
	LookupLayoutable      interface{}         `json:"lookupLayoutable"`
	Mergeable             bool                `json:"mergeable"`
	MruEnabled            bool                `json:"mruEnabled"`
	Name                  string              `json:"name"`
	NamedLayoutInfos      []interface{}       `json:"namedLayoutInfos"`
	NetworkScopeFieldName interface{}         `json:"networkScopeFieldName"`
	Queryable             bool                `json:"queryable"`
	RecordTypeInfos       []RecordTypeInfo    `json:"recordTypeInfos"`
	Replicateable         bool                `json:"replicateable"`
	Retrieveable          bool                `json:"retrieveable"`
	SearchLayoutable      bool                `json:"searchLayoutable"`
	Searchable            bool                `json:"searchable"`
	SupportedScopes       []interface{}       `json:"supportedScopes"`
	Triggerable           bool                `json:"triggerable"`
	Undeletable           bool                `json:"undeletable"`
	Updateable            bool                `json:"updateable"`
	Urls                  map[string]string   `json:"urls"`
}

type SObjectField struct {
	Aggregatable                 bool          `json:"aggregatable"`
	AiPredictionField            bool          `json:"aiPredictionField"`
	AutoNumber                   bool          `json:"autoNumber"`
	ByteLength                   int           `json:"byteLength"`
	Calculated                   bool          `json:"calculated"`
	CalculatedFormula            *string       `json:"calculatedFormula"`
	CascadeDelete                bool          `json:"cascadeDelete"`
	CaseSensitive                bool          `json:"caseSensitive"`
	CompoundFieldName            *string       `json:"compoundFieldName"`
	ControllerName               *string       `json:"controllerName"`
	Createable                   bool          `json:"createable"`
	Custom                       bool          `json:"custom"`
	DefaultValue                 interface{}   `json:"defaultValue"`
	DefaultValueFormula          *string       `json:"defaultValueFormula"`
	DefaultedOnCreate            bool          `json:"defaultedOnCreate"`
	DependentPicklist            bool          `json:"dependentPicklist"`
	DeprecatedAndHidden          bool          `json:"deprecatedAndHidden"`
	Digits                       int           `json:"digits"`
	DisplayLocationInDecimal     bool          `json:"displayLocationInDecimal"`
	Encrypted                    bool          `json:"encrypted"`
	ExternalID                   bool          `json:"externalId"`
	ExtraTypeInfo                *string       `json:"extraTypeInfo"`
	Filterable                   bool          `json:"filterable"`
	FilteredLookupInfo           interface{}   `json:"filteredLookupInfo"`
	FormulaTreatNullNumberAsZero bool          `json:"formulaTreatNullNumberAsZero"`
	Groupable                    bool          `json:"groupable"`
	HighScaleNumber              bool          `json:"highScaleNumber"`
	HtmlFormatted                bool          `json:"htmlFormatted"`
	IdLookup                     bool          `json:"idLookup"`
	InlineHelpText               *string       `json:"inlineHelpText"`
	Label                        string        `json:"label"`
	Length                       int           `json:"length"`
	Mask                         *string       `json:"mask"`
	MaskType                     *string       `json:"maskType"`
	Name                         string        `json:"name"`
	NameField                    bool          `json:"nameField"`
	NamePointing                 bool          `json:"namePointing"`
	Nillable                     bool          `json:"nillable"`
	Permissionable               bool          `json:"permissionable"`
	PicklistValues               []interface{} `json:"picklistValues"`
	PolymorphicForeignKey        bool          `json:"polymorphicForeignKey"`
	Precision                    int           `json:"precision"`
	QueryByDistance              bool          `json:"queryByDistance"`
	Readable                     bool          `json:"readable"`
	ReferenceTargetField         *string       `json:"referenceTargetField"`
	ReferenceTo                  []string      `json:"referenceTo"`
	RelationshipName             *string       `json:"relationshipName"`
	RelationshipOrder            *int          `json:"relationshipOrder"`
	RestrictedDelete             bool          `json:"restrictedDelete"`
	RestrictedPicklist           bool          `json:"restrictedPicklist"`
	Scale                        int           `json:"scale"`
	SearchPrefilterable          bool          `json:"searchPrefilterable"`
	SoapType                     string        `json:"soapType"`
	Sortable                     bool          `json:"sortable"`
	Type                         string        `json:"type"`
	Unique                       bool          `json:"unique"`
	Updateable                   bool          `json:"updateable"`
	WriteRequiresMasterRead      bool          `json:"writeRequiresMasterRead"`
}

type RecordTypeInfo struct {
	Active                   bool              `json:"active"`
	Available                bool              `json:"available"`
	DefaultRecordTypeMapping bool              `json:"defaultRecordTypeMapping"`
	DeveloperName            string            `json:"developerName"`
	Master                   bool              `json:"master"`
	Name                     string            `json:"name"`
	RecordTypeId             string            `json:"recordTypeId"`
	Urls                     map[string]string `json:"urls"`
}

type ChildRelationship struct {
	CascadeDelete       bool     `json:"cascadeDelete"`
	ChildSObject        string   `json:"childSObject"`
	DeprecatedAndHidden bool     `json:"deprecatedAndHidden"`
	Field               string   `json:"field"`
	JunctionIdListNames []string `json:"junctionIdListNames"`
	JunctionReferenceTo []string `json:"junctionReferenceTo"`
	RelationshipName    string   `json:"relationshipName"`
	RestrictedDelete    bool     `json:"restrictedDelete"`
}
