you should make this generic that does the casting for you, so
`SchemaDeserializer.DeserializeSchema<IIndexerSetting>(indexer.Settings, indexerResource.Fields);`

and do the cast inside `DeserializeSchema`