Quota.fromJson constructor

Quota.fromJson(
  1. Object? j
)

Implementation

factory Quota.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Quota(
    limit: switch (json['limit']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
    metric: switch (json['metric']) {
      null => null,
      Object $1 => decodeString($1),
    },
    owner: switch (json['owner']) {
      null => null,
      Object $1 => decodeString($1),
    },
    usage: switch (json['usage']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
  );
}