toApiCacheType method

ApiCacheType toApiCacheType()

Implementation

ApiCacheType toApiCacheType() {
  switch (this) {
    case 'T2_SMALL':
      return ApiCacheType.t2Small;
    case 'T2_MEDIUM':
      return ApiCacheType.t2Medium;
    case 'R4_LARGE':
      return ApiCacheType.r4Large;
    case 'R4_XLARGE':
      return ApiCacheType.r4Xlarge;
    case 'R4_2XLARGE':
      return ApiCacheType.r4_2xlarge;
    case 'R4_4XLARGE':
      return ApiCacheType.r4_4xlarge;
    case 'R4_8XLARGE':
      return ApiCacheType.r4_8xlarge;
    case 'SMALL':
      return ApiCacheType.small;
    case 'MEDIUM':
      return ApiCacheType.medium;
    case 'LARGE':
      return ApiCacheType.large;
    case 'XLARGE':
      return ApiCacheType.xlarge;
    case 'LARGE_2X':
      return ApiCacheType.large_2x;
    case 'LARGE_4X':
      return ApiCacheType.large_4x;
    case 'LARGE_8X':
      return ApiCacheType.large_8x;
    case 'LARGE_12X':
      return ApiCacheType.large_12x;
  }
  throw Exception('$this is not known in enum ApiCacheType');
}