toSavingsPlansFilterName method

SavingsPlansFilterName toSavingsPlansFilterName()

Implementation

SavingsPlansFilterName toSavingsPlansFilterName() {
  switch (this) {
    case 'region':
      return SavingsPlansFilterName.region;
    case 'ec2-instance-family':
      return SavingsPlansFilterName.ec2InstanceFamily;
    case 'commitment':
      return SavingsPlansFilterName.commitment;
    case 'upfront':
      return SavingsPlansFilterName.upfront;
    case 'term':
      return SavingsPlansFilterName.term;
    case 'savings-plan-type':
      return SavingsPlansFilterName.savingsPlanType;
    case 'payment-option':
      return SavingsPlansFilterName.paymentOption;
    case 'start':
      return SavingsPlansFilterName.start;
    case 'end':
      return SavingsPlansFilterName.end;
  }
  throw Exception('$this is not known in enum SavingsPlansFilterName');
}