toPartitionInstanceType method

PartitionInstanceType toPartitionInstanceType()

Implementation

PartitionInstanceType toPartitionInstanceType() {
  switch (this) {
    case 'search.m1.small':
      return PartitionInstanceType.searchM1Small;
    case 'search.m1.large':
      return PartitionInstanceType.searchM1Large;
    case 'search.m2.xlarge':
      return PartitionInstanceType.searchM2Xlarge;
    case 'search.m2.2xlarge':
      return PartitionInstanceType.searchM2_2xlarge;
    case 'search.m3.medium':
      return PartitionInstanceType.searchM3Medium;
    case 'search.m3.large':
      return PartitionInstanceType.searchM3Large;
    case 'search.m3.xlarge':
      return PartitionInstanceType.searchM3Xlarge;
    case 'search.m3.2xlarge':
      return PartitionInstanceType.searchM3_2xlarge;
    case 'search.small':
      return PartitionInstanceType.searchSmall;
    case 'search.medium':
      return PartitionInstanceType.searchMedium;
    case 'search.large':
      return PartitionInstanceType.searchLarge;
    case 'search.xlarge':
      return PartitionInstanceType.searchXlarge;
    case 'search.2xlarge':
      return PartitionInstanceType.search_2xlarge;
  }
  throw Exception('$this is not known in enum PartitionInstanceType');
}