Instance.fromJson constructor

Instance.fromJson(
  1. Map json_
)

Implementation

Instance.fromJson(core.Map json_)
    : this(
        alternativeLocationId: json_.containsKey('alternativeLocationId')
            ? json_['alternativeLocationId'] as core.String
            : null,
        authEnabled: json_.containsKey('authEnabled')
            ? json_['authEnabled'] as core.bool
            : null,
        authorizedNetwork: json_.containsKey('authorizedNetwork')
            ? json_['authorizedNetwork'] as core.String
            : null,
        availableMaintenanceVersions:
            json_.containsKey('availableMaintenanceVersions')
                ? (json_['availableMaintenanceVersions'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        connectMode: json_.containsKey('connectMode')
            ? json_['connectMode'] as core.String
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        currentLocationId: json_.containsKey('currentLocationId')
            ? json_['currentLocationId'] as core.String
            : null,
        customerManagedKey: json_.containsKey('customerManagedKey')
            ? json_['customerManagedKey'] as core.String
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        host: json_.containsKey('host') ? json_['host'] 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,
        locationId: json_.containsKey('locationId')
            ? json_['locationId'] as core.String
            : null,
        maintenancePolicy: json_.containsKey('maintenancePolicy')
            ? MaintenancePolicy.fromJson(json_['maintenancePolicy']
                as core.Map<core.String, core.dynamic>)
            : null,
        maintenanceSchedule: json_.containsKey('maintenanceSchedule')
            ? MaintenanceSchedule.fromJson(json_['maintenanceSchedule']
                as core.Map<core.String, core.dynamic>)
            : null,
        maintenanceVersion: json_.containsKey('maintenanceVersion')
            ? json_['maintenanceVersion'] as core.String
            : null,
        memorySizeGb: json_.containsKey('memorySizeGb')
            ? json_['memorySizeGb'] as core.int
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        nodes: json_.containsKey('nodes')
            ? (json_['nodes'] as core.List)
                .map((value) => NodeInfo.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        persistenceConfig: json_.containsKey('persistenceConfig')
            ? PersistenceConfig.fromJson(json_['persistenceConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        persistenceIamIdentity: json_.containsKey('persistenceIamIdentity')
            ? json_['persistenceIamIdentity'] as core.String
            : null,
        port: json_.containsKey('port') ? json_['port'] as core.int : null,
        readEndpoint: json_.containsKey('readEndpoint')
            ? json_['readEndpoint'] as core.String
            : null,
        readEndpointPort: json_.containsKey('readEndpointPort')
            ? json_['readEndpointPort'] as core.int
            : null,
        readReplicasMode: json_.containsKey('readReplicasMode')
            ? json_['readReplicasMode'] as core.String
            : null,
        redisConfigs: json_.containsKey('redisConfigs')
            ? (json_['redisConfigs'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        redisVersion: json_.containsKey('redisVersion')
            ? json_['redisVersion'] as core.String
            : null,
        replicaCount: json_.containsKey('replicaCount')
            ? json_['replicaCount'] as core.int
            : null,
        reservedIpRange: json_.containsKey('reservedIpRange')
            ? json_['reservedIpRange'] as core.String
            : null,
        satisfiesPzi: json_.containsKey('satisfiesPzi')
            ? json_['satisfiesPzi'] as core.bool
            : null,
        satisfiesPzs: json_.containsKey('satisfiesPzs')
            ? json_['satisfiesPzs'] as core.bool
            : null,
        secondaryIpRange: json_.containsKey('secondaryIpRange')
            ? json_['secondaryIpRange'] as core.String
            : null,
        serverCaCerts: json_.containsKey('serverCaCerts')
            ? (json_['serverCaCerts'] as core.List)
                .map((value) => TlsCertificate.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
        statusMessage: json_.containsKey('statusMessage')
            ? json_['statusMessage'] as core.String
            : null,
        suspensionReasons: json_.containsKey('suspensionReasons')
            ? (json_['suspensionReasons'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        tier: json_.containsKey('tier') ? json_['tier'] as core.String : null,
        transitEncryptionMode: json_.containsKey('transitEncryptionMode')
            ? json_['transitEncryptionMode'] as core.String
            : null,
      );