ServiceQuota.fromJson constructor

ServiceQuota.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ServiceQuota.fromJson(Map<String, dynamic> json) {
  return ServiceQuota(
    adjustable: json['Adjustable'] as bool?,
    errorReason: json['ErrorReason'] != null
        ? ErrorReason.fromJson(json['ErrorReason'] as Map<String, dynamic>)
        : null,
    globalQuota: json['GlobalQuota'] as bool?,
    period: json['Period'] != null
        ? QuotaPeriod.fromJson(json['Period'] as Map<String, dynamic>)
        : null,
    quotaArn: json['QuotaArn'] as String?,
    quotaCode: json['QuotaCode'] as String?,
    quotaName: json['QuotaName'] as String?,
    serviceCode: json['ServiceCode'] as String?,
    serviceName: json['ServiceName'] as String?,
    unit: json['Unit'] as String?,
    usageMetric: json['UsageMetric'] != null
        ? MetricInfo.fromJson(json['UsageMetric'] as Map<String, dynamic>)
        : null,
    value: json['Value'] as double?,
  );
}