text: /*
   * Copyright 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   *
   *     http://aws.amazon.com/apache2.0/
   *
   * or in the "license" file accompanying this file. This file is distributed
   * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
   * express or implied. See the License for the specific language governing
   * permissions and limitations under the License.
   */
  
  /*********************************************************
  **********************************************************
  **********************************************************
  
  THIS FILE IS AUTOGENERATED. DO NOT EDIT
  
  **********************************************************
  **********************************************************
  *********************************************************/
  
  #ifndef ALEXACONNECTIVITY_STATUSCODE_H
  #define ALEXACONNECTIVITY_STATUSCODE_H
  
  #include <string>
  #include <vector>
  
  #include <unordered_map>
  #include <AACE/Engine/Utils/UUID/UUID.h>
  #include <nlohmann/json.hpp>
  
  namespace aasb {
  namespace message {
  namespace connectivity {
  namespace alexaConnectivity {
  
  //Enum Definition
  enum class StatusCode {
      SUCCESS,
      FAIL,
  };
  
  inline std::string toString(StatusCode enumValue) {
      switch (enumValue) {
          case (StatusCode::SUCCESS):
              return "SUCCESS";
          case (StatusCode::FAIL):
              return "FAIL";
      }
      throw std::runtime_error("invalidStatusCodeType");
  }
  
  inline StatusCode toStatusCode(const std::string& stringValue) {
      static std::unordered_map<std::string, StatusCode> map = {
          {"SUCCESS", StatusCode::SUCCESS},
          {"FAIL", StatusCode::FAIL},
      };
  
      auto search = map.find(stringValue);
      if (search != map.end()) {
          return search->second;
      }
      throw std::runtime_error("invalidStatusCodeType");
  }
  
  inline void to_json(nlohmann::json& j, const StatusCode& c) {
      j = toString(c);
  }
  
  inline void from_json(const nlohmann::json& j, StatusCode& c) {
      c = toStatusCode(j);
  }
  
  }  // namespace alexaConnectivity
  }  // namespace connectivity
  }  // namespace message
  }  // namespace aasb
  
  #endif  // ALEXACONNECTIVITY_STATUSCODE_H
  