BrokerInstanceOption.fromJson constructor

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

Implementation

factory BrokerInstanceOption.fromJson(Map<String, dynamic> json) {
  return BrokerInstanceOption(
    availabilityZones: (json['availabilityZones'] as List?)
        ?.whereNotNull()
        .map((e) => AvailabilityZone.fromJson(e as Map<String, dynamic>))
        .toList(),
    engineType: (json['engineType'] as String?)?.toEngineType(),
    hostInstanceType: json['hostInstanceType'] as String?,
    storageType: (json['storageType'] as String?)?.toBrokerStorageType(),
    supportedDeploymentModes: (json['supportedDeploymentModes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toDeploymentMode())
        .toList(),
    supportedEngineVersions: (json['supportedEngineVersions'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}