InstanceGroupManagerResizeRequest.fromJson constructor

InstanceGroupManagerResizeRequest.fromJson(
  1. Object? j
)

Implementation

factory InstanceGroupManagerResizeRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return InstanceGroupManagerResizeRequest(
    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),
    },
    instances: switch (json['instances']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) PerInstanceConfig.fromJson(i)],
      _ => throw const FormatException('"instances" is not a list'),
    },
    kind: switch (json['kind']) {
      null => null,
      Object $1 => decodeString($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    region: switch (json['region']) {
      null => null,
      Object $1 => decodeString($1),
    },
    requestedRunDuration: switch (json['requestedRunDuration']) {
      null => null,
      Object $1 => Duration.fromJson($1),
    },
    resizeBy: switch (json['resizeBy']) {
      null => null,
      Object $1 => decodeInt($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),
    },
    status: switch (json['status']) {
      null => null,
      Object $1 => InstanceGroupManagerResizeRequestStatus.fromJson($1),
    },
    zone: switch (json['zone']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}