text: /**
   * eZmax API Definition
   * This API expose all the functionnalities for the eZmax and eZsign applications.
   *
   * The version of the OpenAPI document: 1.1.6
   * Contact: support-api@ezmax.ca
   *
   * NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  
  
  #include "eZmaxApi/model/Email_RequestCompound.h"
  
  namespace org {
  namespace openapitools {
  namespace client {
  namespace model {
  
  
  
  Email_RequestCompound::Email_RequestCompound()
  {
      m_FkiEmailtypeID = 0;
      m_FkiEmailtypeIDIsSet = false;
      m_SEmailAddress = utility::conversions::to_string_t("");
      m_SEmailAddressIsSet = false;
  }
  
  Email_RequestCompound::~Email_RequestCompound()
  {
  }
  
  void Email_RequestCompound::validate()
  {
      // TODO: implement validation
  }
  
  web::json::value Email_RequestCompound::toJson() const
  {
  
      web::json::value val = web::json::value::object();
      
      if(m_FkiEmailtypeIDIsSet)
      {
          val[utility::conversions::to_string_t(U("fkiEmailtypeID"))] = ModelBase::toJson(m_FkiEmailtypeID);
      }
      if(m_SEmailAddressIsSet)
      {
          val[utility::conversions::to_string_t(U("sEmailAddress"))] = ModelBase::toJson(m_SEmailAddress);
      }
  
      return val;
  }
  
  bool Email_RequestCompound::fromJson(const web::json::value& val)
  {
      bool ok = true;
      
      if(val.has_field(utility::conversions::to_string_t(U("fkiEmailtypeID"))))
      {
          const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("fkiEmailtypeID")));
          if(!fieldValue.is_null())
          {
              int32_t refVal_fkiEmailtypeID;
              ok &= ModelBase::fromJson(fieldValue, refVal_fkiEmailtypeID);
              setFkiEmailtypeID(refVal_fkiEmailtypeID);
          }
      }
      if(val.has_field(utility::conversions::to_string_t(U("sEmailAddress"))))
      {
          const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("sEmailAddress")));
          if(!fieldValue.is_null())
          {
              utility::string_t refVal_sEmailAddress;
              ok &= ModelBase::fromJson(fieldValue, refVal_sEmailAddress);
              setSEmailAddress(refVal_sEmailAddress);
          }
      }
      return ok;
  }
  
  void Email_RequestCompound::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(U(".")))
      {
          namePrefix += utility::conversions::to_string_t(U("."));
      }
      if(m_FkiEmailtypeIDIsSet)
      {
          multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("fkiEmailtypeID")), m_FkiEmailtypeID));
      }
      if(m_SEmailAddressIsSet)
      {
          multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("sEmailAddress")), m_SEmailAddress));
      }
  }
  
  bool Email_RequestCompound::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
  {
      bool ok = true;
      utility::string_t namePrefix = prefix;
      if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
      {
          namePrefix += utility::conversions::to_string_t(U("."));
      }
  
      if(multipart->hasContent(utility::conversions::to_string_t(U("fkiEmailtypeID"))))
      {
          int32_t refVal_fkiEmailtypeID;
          ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fkiEmailtypeID"))), refVal_fkiEmailtypeID );
          setFkiEmailtypeID(refVal_fkiEmailtypeID);
      }
      if(multipart->hasContent(utility::conversions::to_string_t(U("sEmailAddress"))))
      {
          utility::string_t refVal_sEmailAddress;
          ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("sEmailAddress"))), refVal_sEmailAddress );
          setSEmailAddress(refVal_sEmailAddress);
      }
      return ok;
  }
  
  int32_t Email_RequestCompound::getFkiEmailtypeID() const
  {
      return m_FkiEmailtypeID;
  }
  
  void Email_RequestCompound::setFkiEmailtypeID(int32_t value)
  {
      m_FkiEmailtypeID = value;
      m_FkiEmailtypeIDIsSet = true;
  }
  
  bool Email_RequestCompound::fkiEmailtypeIDIsSet() const
  {
      return m_FkiEmailtypeIDIsSet;
  }
  
  void Email_RequestCompound::unsetFkiEmailtypeID()
  {
      m_FkiEmailtypeIDIsSet = false;
  }
  utility::string_t Email_RequestCompound::getSEmailAddress() const
  {
      return m_SEmailAddress;
  }
  
  void Email_RequestCompound::setSEmailAddress(const utility::string_t& value)
  {
      m_SEmailAddress = value;
      m_SEmailAddressIsSet = true;
  }
  
  bool Email_RequestCompound::sEmailAddressIsSet() const
  {
      return m_SEmailAddressIsSet;
  }
  
  void Email_RequestCompound::unsetSEmailAddress()
  {
      m_SEmailAddressIsSet = false;
  }
  }
  }
  }
  }
  
  
  