BatchDedicatedResources.fromJson constructor

BatchDedicatedResources.fromJson(
  1. Object? j
)

Implementation

factory BatchDedicatedResources.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return BatchDedicatedResources(
    machineSpec: switch (json['machineSpec']) {
      null => null,
      Object $1 => MachineSpec.fromJson($1),
    },
    startingReplicaCount: switch (json['startingReplicaCount']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    maxReplicaCount: switch (json['maxReplicaCount']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    flexStart: switch (json['flexStart']) {
      null => null,
      Object $1 => FlexStart.fromJson($1),
    },
    spot: switch (json['spot']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}