DatabaseInstance.fromJson constructor

DatabaseInstance.fromJson(
  1. Map _json
)

Implementation

DatabaseInstance.fromJson(core.Map _json)
    : this(
        backendType: _json.containsKey('backendType')
            ? _json['backendType'] as core.String
            : null,
        connectionName: _json.containsKey('connectionName')
            ? _json['connectionName'] as core.String
            : null,
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] as core.String
            : null,
        currentDiskSize: _json.containsKey('currentDiskSize')
            ? _json['currentDiskSize'] as core.String
            : null,
        databaseVersion: _json.containsKey('databaseVersion')
            ? _json['databaseVersion'] as core.String
            : null,
        diskEncryptionConfiguration:
            _json.containsKey('diskEncryptionConfiguration')
                ? DiskEncryptionConfiguration.fromJson(
                    _json['diskEncryptionConfiguration']
                        as core.Map<core.String, core.dynamic>)
                : null,
        diskEncryptionStatus: _json.containsKey('diskEncryptionStatus')
            ? DiskEncryptionStatus.fromJson(_json['diskEncryptionStatus']
                as core.Map<core.String, core.dynamic>)
            : null,
        etag: _json.containsKey('etag') ? _json['etag'] as core.String : null,
        failoverReplica: _json.containsKey('failoverReplica')
            ? DatabaseInstanceFailoverReplica.fromJson(
                _json['failoverReplica']
                    as core.Map<core.String, core.dynamic>)
            : null,
        gceZone: _json.containsKey('gceZone')
            ? _json['gceZone'] as core.String
            : null,
        instanceType: _json.containsKey('instanceType')
            ? _json['instanceType'] as core.String
            : null,
        ipAddresses: _json.containsKey('ipAddresses')
            ? (_json['ipAddresses'] as core.List)
                .map<IpMapping>((value) => IpMapping.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        ipv6Address: _json.containsKey('ipv6Address')
            ? _json['ipv6Address'] as core.String
            : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
        masterInstanceName: _json.containsKey('masterInstanceName')
            ? _json['masterInstanceName'] as core.String
            : null,
        maxDiskSize: _json.containsKey('maxDiskSize')
            ? _json['maxDiskSize'] as core.String
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        onPremisesConfiguration: _json.containsKey('onPremisesConfiguration')
            ? OnPremisesConfiguration.fromJson(
                _json['onPremisesConfiguration']
                    as core.Map<core.String, core.dynamic>)
            : null,
        outOfDiskReport: _json.containsKey('outOfDiskReport')
            ? SqlOutOfDiskReport.fromJson(_json['outOfDiskReport']
                as core.Map<core.String, core.dynamic>)
            : null,
        project: _json.containsKey('project')
            ? _json['project'] as core.String
            : null,
        region: _json.containsKey('region')
            ? _json['region'] as core.String
            : null,
        replicaConfiguration: _json.containsKey('replicaConfiguration')
            ? ReplicaConfiguration.fromJson(_json['replicaConfiguration']
                as core.Map<core.String, core.dynamic>)
            : null,
        replicaNames: _json.containsKey('replicaNames')
            ? (_json['replicaNames'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
        rootPassword: _json.containsKey('rootPassword')
            ? _json['rootPassword'] as core.String
            : null,
        satisfiesPzs: _json.containsKey('satisfiesPzs')
            ? _json['satisfiesPzs'] as core.bool
            : null,
        scheduledMaintenance: _json.containsKey('scheduledMaintenance')
            ? SqlScheduledMaintenance.fromJson(_json['scheduledMaintenance']
                as core.Map<core.String, core.dynamic>)
            : null,
        secondaryGceZone: _json.containsKey('secondaryGceZone')
            ? _json['secondaryGceZone'] as core.String
            : null,
        selfLink: _json.containsKey('selfLink')
            ? _json['selfLink'] as core.String
            : null,
        serverCaCert: _json.containsKey('serverCaCert')
            ? SslCert.fromJson(
                _json['serverCaCert'] as core.Map<core.String, core.dynamic>)
            : null,
        serviceAccountEmailAddress:
            _json.containsKey('serviceAccountEmailAddress')
                ? _json['serviceAccountEmailAddress'] as core.String
                : null,
        settings: _json.containsKey('settings')
            ? Settings.fromJson(
                _json['settings'] as core.Map<core.String, core.dynamic>)
            : null,
        state:
            _json.containsKey('state') ? _json['state'] as core.String : null,
        suspensionReason: _json.containsKey('suspensionReason')
            ? (_json['suspensionReason'] as core.List)
                .map<core.String>((value) => value as core.String)
                .toList()
            : null,
      );