Settings.fromJson constructor

Settings.fromJson(
  1. Map _json
)

Implementation

Settings.fromJson(core.Map _json)
    : this(
        activationPolicy: _json.containsKey('activationPolicy')
            ? _json['activationPolicy'] as core.String
            : null,
        activeDirectoryConfig: _json.containsKey('activeDirectoryConfig')
            ? SqlActiveDirectoryConfig.fromJson(_json['activeDirectoryConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        authorizedGaeApplications:
            _json.containsKey('authorizedGaeApplications')
                ? (_json['authorizedGaeApplications'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        availabilityType: _json.containsKey('availabilityType')
            ? _json['availabilityType'] as core.String
            : null,
        backupConfiguration: _json.containsKey('backupConfiguration')
            ? BackupConfiguration.fromJson(_json['backupConfiguration']
                as core.Map<core.String, core.dynamic>)
            : null,
        collation: _json.containsKey('collation')
            ? _json['collation'] as core.String
            : null,
        crashSafeReplicationEnabled:
            _json.containsKey('crashSafeReplicationEnabled')
                ? _json['crashSafeReplicationEnabled'] as core.bool
                : null,
        dataDiskSizeGb: _json.containsKey('dataDiskSizeGb')
            ? _json['dataDiskSizeGb'] as core.String
            : null,
        dataDiskType: _json.containsKey('dataDiskType')
            ? _json['dataDiskType'] as core.String
            : null,
        databaseFlags: _json.containsKey('databaseFlags')
            ? (_json['databaseFlags'] as core.List)
                .map((value) => DatabaseFlags.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        databaseReplicationEnabled:
            _json.containsKey('databaseReplicationEnabled')
                ? _json['databaseReplicationEnabled'] as core.bool
                : null,
        denyMaintenancePeriods: _json.containsKey('denyMaintenancePeriods')
            ? (_json['denyMaintenancePeriods'] as core.List)
                .map((value) => DenyMaintenancePeriod.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        insightsConfig: _json.containsKey('insightsConfig')
            ? InsightsConfig.fromJson(_json['insightsConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        ipConfiguration: _json.containsKey('ipConfiguration')
            ? IpConfiguration.fromJson(_json['ipConfiguration']
                as core.Map<core.String, core.dynamic>)
            : null,
        kind: _json.containsKey('kind') ? _json['kind'] as core.String : null,
        locationPreference: _json.containsKey('locationPreference')
            ? LocationPreference.fromJson(_json['locationPreference']
                as core.Map<core.String, core.dynamic>)
            : null,
        maintenanceWindow: _json.containsKey('maintenanceWindow')
            ? MaintenanceWindow.fromJson(_json['maintenanceWindow']
                as core.Map<core.String, core.dynamic>)
            : null,
        passwordValidationPolicy:
            _json.containsKey('passwordValidationPolicy')
                ? PasswordValidationPolicy.fromJson(
                    _json['passwordValidationPolicy']
                        as core.Map<core.String, core.dynamic>)
                : null,
        pricingPlan: _json.containsKey('pricingPlan')
            ? _json['pricingPlan'] as core.String
            : null,
        replicationType: _json.containsKey('replicationType')
            ? _json['replicationType'] as core.String
            : null,
        settingsVersion: _json.containsKey('settingsVersion')
            ? _json['settingsVersion'] as core.String
            : null,
        sqlServerAuditConfig: _json.containsKey('sqlServerAuditConfig')
            ? SqlServerAuditConfig.fromJson(_json['sqlServerAuditConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        storageAutoResize: _json.containsKey('storageAutoResize')
            ? _json['storageAutoResize'] as core.bool
            : null,
        storageAutoResizeLimit: _json.containsKey('storageAutoResizeLimit')
            ? _json['storageAutoResizeLimit'] as core.String
            : null,
        tier: _json.containsKey('tier') ? _json['tier'] as core.String : null,
        userLabels: _json.containsKey('userLabels')
            ? (_json['userLabels'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, item) => core.MapEntry(
                  key,
                  item as core.String,
                ),
              )
            : null,
      );