ServerConfig.fromJson constructor

ServerConfig.fromJson(
  1. Map json_
)

Implementation

ServerConfig.fromJson(core.Map json_)
    : this(
        channels: json_.containsKey('channels')
            ? (json_['channels'] as core.List)
                .map((value) => ReleaseChannelConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        defaultClusterVersion: json_.containsKey('defaultClusterVersion')
            ? json_['defaultClusterVersion'] as core.String
            : null,
        defaultImageType: json_.containsKey('defaultImageType')
            ? json_['defaultImageType'] as core.String
            : null,
        validImageTypes: json_.containsKey('validImageTypes')
            ? (json_['validImageTypes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        validMasterVersions: json_.containsKey('validMasterVersions')
            ? (json_['validMasterVersions'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        validNodeVersions: json_.containsKey('validNodeVersions')
            ? (json_['validNodeVersions'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );