Instance.fromJson constructor

Instance.fromJson(
  1. Map json_
)

Implementation

Instance.fromJson(core.Map json_)
    : this(
        annotations: json_.containsKey('annotations')
            ? (json_['annotations'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        availabilityType: json_.containsKey('availabilityType')
            ? json_['availabilityType'] as core.String
            : null,
        clientConnectionConfig: json_.containsKey('clientConnectionConfig')
            ? ClientConnectionConfig.fromJson(json_['clientConnectionConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        databaseFlags: json_.containsKey('databaseFlags')
            ? (json_['databaseFlags'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        deleteTime: json_.containsKey('deleteTime')
            ? json_['deleteTime'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        gceZone: json_.containsKey('gceZone')
            ? json_['gceZone'] as core.String
            : null,
        instanceType: json_.containsKey('instanceType')
            ? json_['instanceType'] as core.String
            : null,
        ipAddress: json_.containsKey('ipAddress')
            ? json_['ipAddress'] as core.String
            : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        machineConfig: json_.containsKey('machineConfig')
            ? MachineConfig.fromJson(
                json_['machineConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        networkConfig: json_.containsKey('networkConfig')
            ? InstanceNetworkConfig.fromJson(
                json_['networkConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        nodes: json_.containsKey('nodes')
            ? (json_['nodes'] as core.List)
                .map((value) => Node.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        pscInstanceConfig: json_.containsKey('pscInstanceConfig')
            ? PscInstanceConfig.fromJson(json_['pscInstanceConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        publicIpAddress: json_.containsKey('publicIpAddress')
            ? json_['publicIpAddress'] as core.String
            : null,
        queryInsightsConfig: json_.containsKey('queryInsightsConfig')
            ? QueryInsightsInstanceConfig.fromJson(
                json_['queryInsightsConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        readPoolConfig: json_.containsKey('readPoolConfig')
            ? ReadPoolConfig.fromJson(json_['readPoolConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        reconciling: json_.containsKey('reconciling')
            ? json_['reconciling'] as core.bool
            : null,
        satisfiesPzs: json_.containsKey('satisfiesPzs')
            ? json_['satisfiesPzs'] as core.bool
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        uid: json_.containsKey('uid') ? json_['uid'] as core.String : null,
        updateTime: json_.containsKey('updateTime')
            ? json_['updateTime'] as core.String
            : null,
        writableNode: json_.containsKey('writableNode')
            ? Node.fromJson(
                json_['writableNode'] as core.Map<core.String, core.dynamic>)
            : null,
      );