toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final instanceFleetType = this.instanceFleetType;
  final instanceTypeConfigs = this.instanceTypeConfigs;
  final launchSpecifications = this.launchSpecifications;
  final name = this.name;
  final targetOnDemandCapacity = this.targetOnDemandCapacity;
  final targetSpotCapacity = this.targetSpotCapacity;
  return {
    'InstanceFleetType': instanceFleetType.toValue(),
    if (instanceTypeConfigs != null)
      'InstanceTypeConfigs': instanceTypeConfigs,
    if (launchSpecifications != null)
      'LaunchSpecifications': launchSpecifications,
    if (name != null) 'Name': name,
    if (targetOnDemandCapacity != null)
      'TargetOnDemandCapacity': targetOnDemandCapacity,
    if (targetSpotCapacity != null) 'TargetSpotCapacity': targetSpotCapacity,
  };
}