/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/workspaces/model/Compute.h>

using namespace Aws::Utils;

namespace Aws {
namespace WorkSpaces {
namespace Model {
namespace ComputeMapper {

static const int VALUE_HASH = HashingUtils::HashString("VALUE");
static const int STANDARD_HASH = HashingUtils::HashString("STANDARD");
static const int PERFORMANCE_HASH = HashingUtils::HashString("PERFORMANCE");
static const int POWER_HASH = HashingUtils::HashString("POWER");
static const int GRAPHICS_HASH = HashingUtils::HashString("GRAPHICS");
static const int POWERPRO_HASH = HashingUtils::HashString("POWERPRO");
static const int GENERALPURPOSE_4XLARGE_HASH = HashingUtils::HashString("GENERALPURPOSE_4XLARGE");
static const int GENERALPURPOSE_8XLARGE_HASH = HashingUtils::HashString("GENERALPURPOSE_8XLARGE");
static const int GRAPHICSPRO_HASH = HashingUtils::HashString("GRAPHICSPRO");
static const int GRAPHICS_G4DN_HASH = HashingUtils::HashString("GRAPHICS_G4DN");
static const int GRAPHICSPRO_G4DN_HASH = HashingUtils::HashString("GRAPHICSPRO_G4DN");
static const int GRAPHICS_G6_XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6_XLARGE");
static const int GRAPHICS_G6_2XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6_2XLARGE");
static const int GRAPHICS_G6_4XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6_4XLARGE");
static const int GRAPHICS_G6_8XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6_8XLARGE");
static const int GRAPHICS_G6_16XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6_16XLARGE");
static const int GRAPHICS_GR6_4XLARGE_HASH = HashingUtils::HashString("GRAPHICS_GR6_4XLARGE");
static const int GRAPHICS_GR6_8XLARGE_HASH = HashingUtils::HashString("GRAPHICS_GR6_8XLARGE");
static const int GRAPHICS_G6F_LARGE_HASH = HashingUtils::HashString("GRAPHICS_G6F_LARGE");
static const int GRAPHICS_G6F_XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6F_XLARGE");
static const int GRAPHICS_G6F_2XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6F_2XLARGE");
static const int GRAPHICS_G6F_4XLARGE_HASH = HashingUtils::HashString("GRAPHICS_G6F_4XLARGE");
static const int GRAPHICS_GR6F_4XLARGE_HASH = HashingUtils::HashString("GRAPHICS_GR6F_4XLARGE");

Compute GetComputeForName(const Aws::String& name) {
  int hashCode = HashingUtils::HashString(name.c_str());
  if (hashCode == VALUE_HASH) {
    return Compute::VALUE;
  } else if (hashCode == STANDARD_HASH) {
    return Compute::STANDARD;
  } else if (hashCode == PERFORMANCE_HASH) {
    return Compute::PERFORMANCE;
  } else if (hashCode == POWER_HASH) {
    return Compute::POWER;
  } else if (hashCode == GRAPHICS_HASH) {
    return Compute::GRAPHICS;
  } else if (hashCode == POWERPRO_HASH) {
    return Compute::POWERPRO;
  } else if (hashCode == GENERALPURPOSE_4XLARGE_HASH) {
    return Compute::GENERALPURPOSE_4XLARGE;
  } else if (hashCode == GENERALPURPOSE_8XLARGE_HASH) {
    return Compute::GENERALPURPOSE_8XLARGE;
  } else if (hashCode == GRAPHICSPRO_HASH) {
    return Compute::GRAPHICSPRO;
  } else if (hashCode == GRAPHICS_G4DN_HASH) {
    return Compute::GRAPHICS_G4DN;
  } else if (hashCode == GRAPHICSPRO_G4DN_HASH) {
    return Compute::GRAPHICSPRO_G4DN;
  } else if (hashCode == GRAPHICS_G6_XLARGE_HASH) {
    return Compute::GRAPHICS_G6_XLARGE;
  } else if (hashCode == GRAPHICS_G6_2XLARGE_HASH) {
    return Compute::GRAPHICS_G6_2XLARGE;
  } else if (hashCode == GRAPHICS_G6_4XLARGE_HASH) {
    return Compute::GRAPHICS_G6_4XLARGE;
  } else if (hashCode == GRAPHICS_G6_8XLARGE_HASH) {
    return Compute::GRAPHICS_G6_8XLARGE;
  } else if (hashCode == GRAPHICS_G6_16XLARGE_HASH) {
    return Compute::GRAPHICS_G6_16XLARGE;
  } else if (hashCode == GRAPHICS_GR6_4XLARGE_HASH) {
    return Compute::GRAPHICS_GR6_4XLARGE;
  } else if (hashCode == GRAPHICS_GR6_8XLARGE_HASH) {
    return Compute::GRAPHICS_GR6_8XLARGE;
  } else if (hashCode == GRAPHICS_G6F_LARGE_HASH) {
    return Compute::GRAPHICS_G6F_LARGE;
  } else if (hashCode == GRAPHICS_G6F_XLARGE_HASH) {
    return Compute::GRAPHICS_G6F_XLARGE;
  } else if (hashCode == GRAPHICS_G6F_2XLARGE_HASH) {
    return Compute::GRAPHICS_G6F_2XLARGE;
  } else if (hashCode == GRAPHICS_G6F_4XLARGE_HASH) {
    return Compute::GRAPHICS_G6F_4XLARGE;
  } else if (hashCode == GRAPHICS_GR6F_4XLARGE_HASH) {
    return Compute::GRAPHICS_GR6F_4XLARGE;
  }
  EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
  if (overflowContainer) {
    overflowContainer->StoreOverflow(hashCode, name);
    return static_cast<Compute>(hashCode);
  }

  return Compute::NOT_SET;
}

Aws::String GetNameForCompute(Compute enumValue) {
  switch (enumValue) {
    case Compute::NOT_SET:
      return {};
    case Compute::VALUE:
      return "VALUE";
    case Compute::STANDARD:
      return "STANDARD";
    case Compute::PERFORMANCE:
      return "PERFORMANCE";
    case Compute::POWER:
      return "POWER";
    case Compute::GRAPHICS:
      return "GRAPHICS";
    case Compute::POWERPRO:
      return "POWERPRO";
    case Compute::GENERALPURPOSE_4XLARGE:
      return "GENERALPURPOSE_4XLARGE";
    case Compute::GENERALPURPOSE_8XLARGE:
      return "GENERALPURPOSE_8XLARGE";
    case Compute::GRAPHICSPRO:
      return "GRAPHICSPRO";
    case Compute::GRAPHICS_G4DN:
      return "GRAPHICS_G4DN";
    case Compute::GRAPHICSPRO_G4DN:
      return "GRAPHICSPRO_G4DN";
    case Compute::GRAPHICS_G6_XLARGE:
      return "GRAPHICS_G6_XLARGE";
    case Compute::GRAPHICS_G6_2XLARGE:
      return "GRAPHICS_G6_2XLARGE";
    case Compute::GRAPHICS_G6_4XLARGE:
      return "GRAPHICS_G6_4XLARGE";
    case Compute::GRAPHICS_G6_8XLARGE:
      return "GRAPHICS_G6_8XLARGE";
    case Compute::GRAPHICS_G6_16XLARGE:
      return "GRAPHICS_G6_16XLARGE";
    case Compute::GRAPHICS_GR6_4XLARGE:
      return "GRAPHICS_GR6_4XLARGE";
    case Compute::GRAPHICS_GR6_8XLARGE:
      return "GRAPHICS_GR6_8XLARGE";
    case Compute::GRAPHICS_G6F_LARGE:
      return "GRAPHICS_G6F_LARGE";
    case Compute::GRAPHICS_G6F_XLARGE:
      return "GRAPHICS_G6F_XLARGE";
    case Compute::GRAPHICS_G6F_2XLARGE:
      return "GRAPHICS_G6F_2XLARGE";
    case Compute::GRAPHICS_G6F_4XLARGE:
      return "GRAPHICS_G6F_4XLARGE";
    case Compute::GRAPHICS_GR6F_4XLARGE:
      return "GRAPHICS_GR6F_4XLARGE";
    default:
      EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
      if (overflowContainer) {
        return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
      }

      return {};
  }
}

}  // namespace ComputeMapper
}  // namespace Model
}  // namespace WorkSpaces
}  // namespace Aws
