ElasticsearchClusterConfig.fromJson constructor

ElasticsearchClusterConfig.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ElasticsearchClusterConfig.fromJson(Map<String, dynamic> json) {
  return ElasticsearchClusterConfig(
    dedicatedMasterCount: json['DedicatedMasterCount'] as int?,
    dedicatedMasterEnabled: json['DedicatedMasterEnabled'] as bool?,
    dedicatedMasterType:
        (json['DedicatedMasterType'] as String?)?.toESPartitionInstanceType(),
    instanceCount: json['InstanceCount'] as int?,
    instanceType:
        (json['InstanceType'] as String?)?.toESPartitionInstanceType(),
    warmCount: json['WarmCount'] as int?,
    warmEnabled: json['WarmEnabled'] as bool?,
    warmType: (json['WarmType'] as String?)?.toESWarmPartitionInstanceType(),
    zoneAwarenessConfig: json['ZoneAwarenessConfig'] != null
        ? ZoneAwarenessConfig.fromJson(
            json['ZoneAwarenessConfig'] as Map<String, dynamic>)
        : null,
    zoneAwarenessEnabled: json['ZoneAwarenessEnabled'] as bool?,
  );
}