toJson method
Implementation
Map<String, dynamic> toJson() {
final maxvCpus = this.maxvCpus;
final subnets = this.subnets;
final type = this.type;
final allocationStrategy = this.allocationStrategy;
final bidPercentage = this.bidPercentage;
final desiredvCpus = this.desiredvCpus;
final ec2Configuration = this.ec2Configuration;
final ec2KeyPair = this.ec2KeyPair;
final imageId = this.imageId;
final instanceRole = this.instanceRole;
final instanceTypes = this.instanceTypes;
final launchTemplate = this.launchTemplate;
final minvCpus = this.minvCpus;
final placementGroup = this.placementGroup;
final securityGroupIds = this.securityGroupIds;
final spotIamFleetRole = this.spotIamFleetRole;
final tags = this.tags;
return {
'maxvCpus': maxvCpus,
'subnets': subnets,
'type': type.toValue(),
if (allocationStrategy != null)
'allocationStrategy': allocationStrategy.toValue(),
if (bidPercentage != null) 'bidPercentage': bidPercentage,
if (desiredvCpus != null) 'desiredvCpus': desiredvCpus,
if (ec2Configuration != null) 'ec2Configuration': ec2Configuration,
if (ec2KeyPair != null) 'ec2KeyPair': ec2KeyPair,
if (imageId != null) 'imageId': imageId,
if (instanceRole != null) 'instanceRole': instanceRole,
if (instanceTypes != null) 'instanceTypes': instanceTypes,
if (launchTemplate != null) 'launchTemplate': launchTemplate,
if (minvCpus != null) 'minvCpus': minvCpus,
if (placementGroup != null) 'placementGroup': placementGroup,
if (securityGroupIds != null) 'securityGroupIds': securityGroupIds,
if (spotIamFleetRole != null) 'spotIamFleetRole': spotIamFleetRole,
if (tags != null) 'tags': tags,
};
}