toDimension method

Dimension toDimension()

Implementation

Dimension toDimension() {
  switch (this) {
    case 'AZ':
      return Dimension.az;
    case 'INSTANCE_TYPE':
      return Dimension.instanceType;
    case 'LINKED_ACCOUNT':
      return Dimension.linkedAccount;
    case 'LINKED_ACCOUNT_NAME':
      return Dimension.linkedAccountName;
    case 'OPERATION':
      return Dimension.operation;
    case 'PURCHASE_TYPE':
      return Dimension.purchaseType;
    case 'REGION':
      return Dimension.region;
    case 'SERVICE':
      return Dimension.service;
    case 'SERVICE_CODE':
      return Dimension.serviceCode;
    case 'USAGE_TYPE':
      return Dimension.usageType;
    case 'USAGE_TYPE_GROUP':
      return Dimension.usageTypeGroup;
    case 'RECORD_TYPE':
      return Dimension.recordType;
    case 'OPERATING_SYSTEM':
      return Dimension.operatingSystem;
    case 'TENANCY':
      return Dimension.tenancy;
    case 'SCOPE':
      return Dimension.scope;
    case 'PLATFORM':
      return Dimension.platform;
    case 'SUBSCRIPTION_ID':
      return Dimension.subscriptionId;
    case 'LEGAL_ENTITY_NAME':
      return Dimension.legalEntityName;
    case 'DEPLOYMENT_OPTION':
      return Dimension.deploymentOption;
    case 'DATABASE_ENGINE':
      return Dimension.databaseEngine;
    case 'CACHE_ENGINE':
      return Dimension.cacheEngine;
    case 'INSTANCE_TYPE_FAMILY':
      return Dimension.instanceTypeFamily;
    case 'BILLING_ENTITY':
      return Dimension.billingEntity;
    case 'RESERVATION_ID':
      return Dimension.reservationId;
    case 'RESOURCE_ID':
      return Dimension.resourceId;
    case 'RIGHTSIZING_TYPE':
      return Dimension.rightsizingType;
    case 'SAVINGS_PLANS_TYPE':
      return Dimension.savingsPlansType;
    case 'SAVINGS_PLAN_ARN':
      return Dimension.savingsPlanArn;
    case 'PAYMENT_OPTION':
      return Dimension.paymentOption;
  }
  throw Exception('$this is not known in enum Dimension');
}