text: /**
   * TextMagic API
   * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
   *
   * OpenAPI spec version: 2
   * 
   *
   * NOTE: This class is auto generated by the swagger code generator 2.4.8.
   * https://github.com/swagger-api/swagger-codegen.git
   * Do not edit the class manually.
   */
  
  
  
  #include "MessagePriceItem.h"
  
  namespace com {
  namespace textmagic {
  namespace client {
  namespace model {
  
  MessagePriceItem::MessagePriceItem()
  {
      m_Name = utility::conversions::to_string_t("");
      m_Price = utility::conversions::to_string_t("");
      m_Country = utility::conversions::to_string_t("");
  }
  
  MessagePriceItem::~MessagePriceItem()
  {
  }
  
  void MessagePriceItem::validate()
  {
      // TODO: implement validation
  }
  
  web::json::value MessagePriceItem::toJson() const
  {
      web::json::value val = web::json::value::object();
  
      val[utility::conversions::to_string_t("name")] = ModelBase::toJson(m_Name);
      val[utility::conversions::to_string_t("price")] = ModelBase::toJson(m_Price);
      val[utility::conversions::to_string_t("country")] = ModelBase::toJson(m_Country);
  
      return val;
  }
  
  void MessagePriceItem::fromJson(web::json::value& val)
  {
      if(val.has_field(utility::conversions::to_string_t("name")))
      {
          web::json::value& fieldValue = val[utility::conversions::to_string_t("name")];
          if(!fieldValue.is_null())
          {
              setName(ModelBase::stringFromJson(fieldValue));
          }
      }
      if(val.has_field(utility::conversions::to_string_t("price")))
      {
          web::json::value& fieldValue = val[utility::conversions::to_string_t("price")];
          if(!fieldValue.is_null())
          {
              setPrice(ModelBase::stringFromJson(fieldValue));
          }
      }
      if(val.has_field(utility::conversions::to_string_t("country")))
      {
          web::json::value& fieldValue = val[utility::conversions::to_string_t("country")];
          if(!fieldValue.is_null())
          {
              setCountry(ModelBase::stringFromJson(fieldValue));
          }
      }
  }
  
  void MessagePriceItem::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
  {
      utility::string_t namePrefix = prefix;
      if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
      {
          namePrefix += utility::conversions::to_string_t(".");
      }
  
      multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("name"), m_Name));
      multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("price"), m_Price));
      multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("country"), m_Country));
  }
  
  void MessagePriceItem::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
  {
      utility::string_t namePrefix = prefix;
      if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
      {
          namePrefix += utility::conversions::to_string_t(".");
      }
  
      setName(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("name"))));
      setPrice(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("price"))));
      setCountry(ModelBase::stringFromHttpContent(multipart->getContent(utility::conversions::to_string_t("country"))));
  }
  
  utility::string_t MessagePriceItem::getName() const
  {
      return m_Name;
  }
  
  
  void MessagePriceItem::setName(utility::string_t value)
  {
      m_Name = value;
      
  }
  utility::string_t MessagePriceItem::getPrice() const
  {
      return m_Price;
  }
  
  
  void MessagePriceItem::setPrice(utility::string_t value)
  {
      m_Price = value;
      
  }
  utility::string_t MessagePriceItem::getCountry() const
  {
      return m_Country;
  }
  
  
  void MessagePriceItem::setCountry(utility::string_t value)
  {
      m_Country = value;
      
  }
  }
  }
  }
  }
  
  