# Class FeatureLayerSchema

An implementation of Schema that directly mirrors the equivalent properties on FeatureLayer.

#### Hierarchy (view full)

- LayerExtensionSchema
  - FeatureLayerSchema
    - FeatureLayerReadOnlySchema

#####
Index

### Constructors

constructor

### Properties

_layerBindings
_layerExtension
@eventTypes
fieldExtensions
fields

### Accessors

displayField
geometryType
hasGeometry
parent
primaryKeyField
spatialReference
timeZone
typeIdField
types

### Methods

_createFieldCollection
_createTypeCollection
_getCollectionSetting
_getNestedSettings
_getPropertyBindings
_getSerializableProperties
_getSetting
_hasSettingIncludingAncestor
_setParent
_setSetting
_toPropertyDef
assignProperties
assignPropertiesAsync
createAllFieldInfos
createPopupTemplate
findFieldByName
finishAssignProperties
getDefault
getDefaults
getSerializableProperties
isModified
reset
toJSON
createFieldInfoFromField

##
Constructors

### constructor

- new FeatureLayerSchema(layerExtension): FeatureLayerSchema

- #### Parameters

  - layerExtension: LayerExtension<LayerExtensionProperties>

  #### Returns FeatureLayerSchema

  Overrides LayerExtensionSchema.constructor

##
Properties

### `Protected` `Readonly`_layerBindings

_layerBindings: Map<keyof FeatureLayerSchema, LayerExtensionSchemaPropertyBinding> = ...

Maps schema properties to properties on Layer.

Inherited from LayerExtensionSchema._layerBindings

### `Protected` `Readonly`_layerExtension

_layerExtension: LayerExtension<LayerExtensionProperties>

The parent layer extension.

Inherited from LayerExtensionSchema._layerExtension

### @eventTypes

@eventTypes: SchemaEvents

#### Deprecated

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

Inherited from LayerExtensionSchema.@eventTypes

### `Readonly` fieldExtensions

fieldExtensions: FieldExtensionCollection

The field extensions associated with each field of the schema.

Inherited from LayerExtensionSchema.fieldExtensions

### `Readonly` fields

fields: FieldCollection

A collection of Field objects describing each field in the schema.

Inherited from LayerExtensionSchema.fields

##
Accessors

### displayField

- get displayField(): string

- The name of the field containing the display name of the feature.

  #### Returns string

  Inherited from LayerExtensionSchema.displayField

- set displayField(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from LayerExtensionSchema.displayField

### geometryType

- get geometryType(): GeometryType

- The type of geometry. This property will be undefined if the data is not spatial.

  #### Returns GeometryType

  Inherited from LayerExtensionSchema.geometryType

- set geometryType(value): void

- #### Parameters

  - value: GeometryType

  #### Returns void

  Inherited from LayerExtensionSchema.geometryType

### hasGeometry

- get hasGeometry(): boolean

- Whether the schema has spatial data.

  #### Returns boolean

  Inherited from LayerExtensionSchema.hasGeometry

### parent

- get parent(): this

- The parent settings that these settings will inherit from.

  #### Returns this

  Inherited from LayerExtensionSchema.parent

- set parent(value): void

- #### Parameters

  - value: this

  #### Returns void

  Inherited from LayerExtensionSchema.parent

### primaryKeyField

- get primaryKeyField(): string

- The name of the field containing the feature's primary key (value that uniquely identifies a feature).

  #### Returns string

  Inherited from LayerExtensionSchema.primaryKeyField

- set primaryKeyField(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from LayerExtensionSchema.primaryKeyField

### spatialReference

- get spatialReference(): SpatialReference

- The spatial reference of the schema. Can be defined using a well-known ID (WKID) or well-known text (WKT).

  #### Returns SpatialReference

  Inherited from LayerExtensionSchema.spatialReference

- set spatialReference(value): void

- #### Parameters

  - value: SpatialReference

  #### Returns void

  Inherited from LayerExtensionSchema.spatialReference

### timeZone

- get timeZone(): string

- The time zone that the data is stored in. The default is UTC.

  #### Returns string

  Inherited from LayerExtensionSchema.timeZone

- set timeZone(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from LayerExtensionSchema.timeZone

### typeIdField

- get typeIdField(): string

- The name of the field holding the type ID or subtypes for the features.

  #### Returns string

  Inherited from LayerExtensionSchema.typeIdField

- set typeIdField(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from LayerExtensionSchema.typeIdField

### types

- get types(): Collection<FeatureType>

- A collection of types or subtypes for the features.

  #### Returns Collection<FeatureType>

  Overrides LayerExtensionSchema.types

##
Methods

### `Protected`_createFieldCollection

- _createFieldCollection(): Collection<Field>

- Creates the backing collection for fields.

  #### Returns Collection<Field>

### `Protected`_createTypeCollection

- _createTypeCollection(): Collection<FeatureType>

- Creates the backing collection for types.

  #### Returns Collection<FeatureType>

### `Protected`_getCollectionSetting

- _getCollectionSetting<T>(setting): Collection<T>

- Gets the value for a setting that represents a collection.

  #### Type Parameters

  - T

  #### Parameters

  - setting: keyof FeatureLayerSchema

    The setting name.

  #### Returns Collection<T>

  Inherited from LayerExtensionSchema._getCollectionSetting

### `Protected`_getNestedSettings

- _getNestedSettings<T>(setting, factory): T

- Gets a property which is itself an instance of Settings.

  #### Type Parameters

  - T extends Settings<unknown>

  #### Parameters

  - setting: keyof FeatureLayerSchema

    The setting name.

  - factory: (() => T)

    A factory for creating the nested settings.

    - - (): T

      - #### Returns T

  Inherited from LayerExtensionSchema._getNestedSettings

### `Protected`_getPropertyBindings

- _getPropertyBindings(): Partial<Record<keyof FeatureLayerSchema, LayerExtensionSchemaPropertyBinding>>

- Returns the property bindings.

  #### Returns Partial<Record<keyof FeatureLayerSchema, LayerExtensionSchemaPropertyBinding>>

  Overrides LayerExtensionSchema._getPropertyBindings

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<SchemaProperties>

- The property keys and their metadata that are used to implement serializing and deserializing the class instance.

  #### Returns PropertyDefs<SchemaProperties>

  Inherited from LayerExtensionSchema._getSerializableProperties

### `Protected`_getSetting

- _getSetting<K>(setting, defaultValue?): FeatureLayerSchema[K]

- Gets the value for a setting.

  #### Type Parameters

  - K extends keyof FeatureLayerSchema

  #### Parameters

  - setting: K

    The setting name.

  - `Optional` defaultValue: FeatureLayerSchema[K]

    The default value if the setting is not explicitly set.

  #### Returns FeatureLayerSchema[K]

  Inherited from LayerExtensionSchema._getSetting

### `Protected`_hasSettingIncludingAncestor

- _hasSettingIncludingAncestor<K>(setting): boolean

- Determines whether the specified setting has been modified locally or by any parent of the current settings instance.

  #### Type Parameters

  - K extends keyof FeatureLayerSchema

  #### Parameters

  - setting: K

    The setting to check.

  #### Returns boolean

  Inherited from LayerExtensionSchema._hasSettingIncludingAncestor

### `Protected`_setParent

- _setParent(parent): void

- Sets the parent settings that these settings will inherit from.

  #### Parameters

  - parent: FeatureLayerSchema

    The parent settings to inherit from.

  #### Returns void

  Inherited from LayerExtensionSchema._setParent

### `Protected`_setSetting

- _setSetting<K>(setting, value): void

- Sets the value for a setting. This will override any inherited value for the setting.

  #### Type Parameters

  - K extends keyof FeatureLayerSchema

  #### Parameters

  - setting: K

    The setting name.

  - value: FeatureLayerSchema[K]

    The setting value.

  #### Returns void

  Inherited from LayerExtensionSchema._setSetting

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from LayerExtensionSchema._toPropertyDef

### assignProperties

- assignProperties(properties): void

- #### Parameters

  - properties: Partial<unknown>

  #### Returns void

  #### Inherit Doc

  Inherited from LayerExtensionSchema.assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- #### Parameters

  - properties: Partial<unknown>

  #### Returns Promise<void>

  #### Inherit Doc

  Inherited from LayerExtensionSchema.assignPropertiesAsync

### createAllFieldInfos

- createAllFieldInfos(): FieldInfo[]

- Creates an array of FieldInfos that includes all fields within the Schema.

  #### Returns FieldInfo[]

  Inherited from LayerExtensionSchema.createAllFieldInfos

### createPopupTemplate

- createPopupTemplate(): PopupTemplate

- Generates an esri PopupTemplate from the fields in this schema.

  #### Returns PopupTemplate

  Inherited from LayerExtensionSchema.createPopupTemplate

### findFieldByName

- findFieldByName(name): Field

- Finds a field by field name.

  #### Parameters

  - name: string

    The name of the field to search for.

  #### Returns Field

  The matching field, or `undefined` if there is no match.

  Inherited from LayerExtensionSchema.findFieldByName

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- #### Returns Promise<void>

  #### Inherit Doc

  Inherited from LayerExtensionSchema.finishAssignProperties

### getDefault

- getDefault<K>(key): unknown

- #### Type Parameters

  - K extends never

  #### Parameters

  - key: K

  #### Returns unknown

  #### Inherit Doc

  Inherited from LayerExtensionSchema.getDefault

### getDefaults

- getDefaults(): SchemaProperties

- #### Returns SchemaProperties

  #### Inherit Doc

  Inherited from LayerExtensionSchema.getDefaults

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<unknown>

- Returns the serializable properties.

  #### Parameters

  - serializeMode: SerializeMode = "all"

    Optional. If specified, only properties that support the given serialization mode will be returned.

  #### Returns PropertyDefs<unknown>

  Inherited from LayerExtensionSchema.getSerializableProperties

### isModified

- isModified(): boolean

- Determines whether the settings have been locally modified in any way.

  #### Returns boolean

  Inherited from LayerExtensionSchema.isModified

- isModified(setting): boolean

- Determines whether the specified setting has been locally modified, and is thus overriding any inherited value.

  #### Parameters

  - setting: keyof FeatureLayerSchema

    The setting to check.

  #### Returns boolean

  Inherited from LayerExtensionSchema.isModified

### reset

- reset(): void

- Removes all local overrides, resetting all settings to their inherited values, if any.

  #### Returns void

  Inherited from LayerExtensionSchema.reset

- reset(setting): void

- Removes a local override for a setting and resets it to its inherited value, if any.

  #### Parameters

  - setting: keyof FeatureLayerSchema

    The setting to reset.

  #### Returns void

  Inherited from LayerExtensionSchema.reset

### toJSON

- toJSON(serializeMode?): SchemaProperties

- #### Parameters

  - serializeMode: SerializeMode = "all"

  #### Returns SchemaProperties

  #### Inherit Doc

  Inherited from LayerExtensionSchema.toJSON

### `Static` createFieldInfoFromField

- createFieldInfoFromField(field): FieldInfo

- Generates a popup template field info object from an esri field.

  #### Parameters

  - field: Field

    The field to generate the field info object from.

  #### Returns FieldInfo

  Inherited from LayerExtensionSchema.createFieldInfoFromField