toComparisonOperator method

ComparisonOperator toComparisonOperator()

Implementation

ComparisonOperator toComparisonOperator() {
  switch (this) {
    case 'less-than':
      return ComparisonOperator.lessThan;
    case 'less-than-equals':
      return ComparisonOperator.lessThanEquals;
    case 'greater-than':
      return ComparisonOperator.greaterThan;
    case 'greater-than-equals':
      return ComparisonOperator.greaterThanEquals;
    case 'in-cidr-set':
      return ComparisonOperator.inCidrSet;
    case 'not-in-cidr-set':
      return ComparisonOperator.notInCidrSet;
    case 'in-port-set':
      return ComparisonOperator.inPortSet;
    case 'not-in-port-set':
      return ComparisonOperator.notInPortSet;
    case 'in-set':
      return ComparisonOperator.inSet;
    case 'not-in-set':
      return ComparisonOperator.notInSet;
  }
  throw Exception('$this is not known in enum ComparisonOperator');
}