Rollout.fromJson constructor

Rollout.fromJson(
  1. Object? j
)

Implementation

factory Rollout.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Rollout(
    cancellationTime: switch (json['cancellationTime']) {
      null => null,
      Object $1 => decodeString($1),
    },
    completionTime: switch (json['completionTime']) {
      null => null,
      Object $1 => decodeString($1),
    },
    creationTimestamp: switch (json['creationTimestamp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    currentWaveNumber: switch (json['currentWaveNumber']) {
      null => null,
      Object $1 => decodeInt64($1),
    },
    description: switch (json['description']) {
      null => null,
      Object $1 => decodeString($1),
    },
    etag: switch (json['etag']) {
      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),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    pauseTime: switch (json['pauseTime']) {
      null => null,
      Object $1 => decodeString($1),
    },
    resumeTime: switch (json['resumeTime']) {
      null => null,
      Object $1 => decodeString($1),
    },
    rolloutEntity: switch (json['rolloutEntity']) {
      null => null,
      Object $1 => RolloutRolloutEntity.fromJson($1),
    },
    rolloutPlan: switch (json['rolloutPlan']) {
      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),
    },
    state: switch (json['state']) {
      null => null,
      Object $1 => decodeString($1),
    },
    waveDetails: switch (json['waveDetails']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) RolloutWaveDetails.fromJson(i),
      ],
      _ => throw const FormatException('"waveDetails" is not a list'),
    },
  );
}