toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final initialInstanceCount = this.initialInstanceCount;
  final instanceType = this.instanceType;
  final modelName = this.modelName;
  final variantName = this.variantName;
  final acceleratorType = this.acceleratorType;
  final initialVariantWeight = this.initialVariantWeight;
  return {
    'InitialInstanceCount': initialInstanceCount,
    'InstanceType': instanceType.toValue(),
    'ModelName': modelName,
    'VariantName': variantName,
    if (acceleratorType != null) 'AcceleratorType': acceleratorType.toValue(),
    if (initialVariantWeight != null)
      'InitialVariantWeight': initialVariantWeight,
  };
}