PurgeExecutionsResponse.fromJson constructor

PurgeExecutionsResponse.fromJson(
  1. Object? j
)

Implementation

factory PurgeExecutionsResponse.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return PurgeExecutionsResponse(
    purgeCount: switch (json['purgeCount']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    purgeSample: switch (json['purgeSample']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) decodeString(i)],
      _ => throw const FormatException('"purgeSample" is not a list'),
    },
  );
}