ClusterConfig.fromJson constructor

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

Implementation

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