toJson method
Implementation
Map<String, dynamic> toJson() {
final onDemandAllocationStrategy = this.onDemandAllocationStrategy;
final onDemandBaseCapacity = this.onDemandBaseCapacity;
final onDemandPercentageAboveBaseCapacity =
this.onDemandPercentageAboveBaseCapacity;
final spotAllocationStrategy = this.spotAllocationStrategy;
final spotInstancePools = this.spotInstancePools;
final spotMaxPrice = this.spotMaxPrice;
return {
if (onDemandAllocationStrategy != null)
'OnDemandAllocationStrategy': onDemandAllocationStrategy,
if (onDemandBaseCapacity != null)
'OnDemandBaseCapacity': onDemandBaseCapacity,
if (onDemandPercentageAboveBaseCapacity != null)
'OnDemandPercentageAboveBaseCapacity':
onDemandPercentageAboveBaseCapacity,
if (spotAllocationStrategy != null)
'SpotAllocationStrategy': spotAllocationStrategy,
if (spotInstancePools != null) 'SpotInstancePools': spotInstancePools,
if (spotMaxPrice != null) 'SpotMaxPrice': spotMaxPrice,
};
}