RolloutPlan.fromJson constructor

RolloutPlan.fromJson(
  1. Object? j
)

Implementation

factory RolloutPlan.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return RolloutPlan(
    creationTimestamp: switch (json['creationTimestamp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    description: switch (json['description']) {
      null => null,
      Object $1 => decodeString($1),
    },
    id: switch (json['id']) {
      null => null,
      Object $1 => decodeUint64($1),
    },
    kind: switch (json['kind']) {
      null => null,
      Object $1 => decodeString($1),
    },
    locationScope: switch (json['locationScope']) {
      null => null,
      Object $1 => decodeString($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLink: switch (json['selfLink']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLinkWithId: switch (json['selfLinkWithId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    waves: switch (json['waves']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) RolloutPlanWave.fromJson(i)],
      _ => throw const FormatException('"waves" is not a list'),
    },
  );
}