VolumeConfig.fromJson constructor

VolumeConfig.fromJson(
  1. Map json_
)

Implementation

VolumeConfig.fromJson(core.Map json_)
    : this(
        gcpService: json_.containsKey('gcpService')
            ? json_['gcpService'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        lunRanges: json_.containsKey('lunRanges')
            ? (json_['lunRanges'] as core.List)
                .map((value) => LunRange.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        machineIds: json_.containsKey('machineIds')
            ? (json_['machineIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        nfsExports: json_.containsKey('nfsExports')
            ? (json_['nfsExports'] as core.List)
                .map((value) => NfsExport.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        performanceTier: json_.containsKey('performanceTier')
            ? json_['performanceTier'] as core.String
            : null,
        protocol: json_.containsKey('protocol')
            ? json_['protocol'] as core.String
            : null,
        sizeGb:
            json_.containsKey('sizeGb') ? json_['sizeGb'] as core.int : null,
        snapshotsEnabled: json_.containsKey('snapshotsEnabled')
            ? json_['snapshotsEnabled'] as core.bool
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        userNote: json_.containsKey('userNote')
            ? json_['userNote'] as core.String
            : null,
      );