text: /**
   * Location API
   * Geolocation, Geocoding and Maps
   *
   * OpenAPI spec version: 2.0.0
   * 
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  
  #include "OAITimezone_schema.h"
  
  #include "OAIHelpers.h"
  
  #include <QJsonDocument>
  #include <QJsonArray>
  #include <QObject>
  #include <QDebug>
  
  namespace OpenAPI {
  
  OAITimezone_schema::OAITimezone_schema(QString json) {
      init();
      this->fromJson(json);
  }
  
  OAITimezone_schema::OAITimezone_schema() {
      init();
  }
  
  OAITimezone_schema::~OAITimezone_schema() {
      this->cleanup();
  }
  
  void
  OAITimezone_schema::init() {
      short_name = new QString("");
      m_short_name_isSet = false;
      offset_sec = 0.0;
      m_offset_sec_isSet = false;
      now_in_dst = new QString("");
      m_now_in_dst_isSet = false;
      name = new QString("");
      m_name_isSet = false;
  }
  
  void
  OAITimezone_schema::cleanup() {
      if(short_name != nullptr) { 
          delete short_name;
      }
      if(offset_sec != nullptr) { 
          delete offset_sec;
      }
      if(now_in_dst != nullptr) { 
          delete now_in_dst;
      }
      if(name != nullptr) { 
          delete name;
      }
  }
  
  OAITimezone_schema*
  OAITimezone_schema::fromJson(QString json) {
      QByteArray array (json.toStdString().c_str());
      QJsonDocument doc = QJsonDocument::fromJson(array);
      QJsonObject jsonObject = doc.object();
      this->fromJsonObject(jsonObject);
      return this;
  }
  
  void
  OAITimezone_schema::fromJsonObject(QJsonObject pJson) {
      ::OpenAPI::setValue(&short_name, pJson["short_name"], "QString", "QString");
      
      ::OpenAPI::setValue(&offset_sec, pJson["offset_sec"], "OAINumber", "OAINumber");
      
      ::OpenAPI::setValue(&now_in_dst, pJson["now_in_dst"], "QString", "QString");
      
      ::OpenAPI::setValue(&name, pJson["name"], "QString", "QString");
      
  }
  
  QString
  OAITimezone_schema::asJson ()
  {
      QJsonObject obj = this->asJsonObject();
      QJsonDocument doc(obj);
      QByteArray bytes = doc.toJson();
      return QString(bytes);
  }
  
  QJsonObject
  OAITimezone_schema::asJsonObject() {
      QJsonObject obj;
      if(short_name != nullptr && *short_name != QString("")){
          toJsonValue(QString("short_name"), short_name, obj, QString("QString"));
      }
      if((offset_sec != nullptr) && (offset_sec->isSet())){
          toJsonValue(QString("offset_sec"), offset_sec, obj, QString("OAINumber"));
      }
      if(now_in_dst != nullptr && *now_in_dst != QString("")){
          toJsonValue(QString("now_in_dst"), now_in_dst, obj, QString("QString"));
      }
      if(name != nullptr && *name != QString("")){
          toJsonValue(QString("name"), name, obj, QString("QString"));
      }
  
      return obj;
  }
  
  QString*
  OAITimezone_schema::getShortName() {
      return short_name;
  }
  void
  OAITimezone_schema::setShortName(QString* short_name) {
      this->short_name = short_name;
      this->m_short_name_isSet = true;
  }
  
  OAINumber*
  OAITimezone_schema::getOffsetSec() {
      return offset_sec;
  }
  void
  OAITimezone_schema::setOffsetSec(OAINumber* offset_sec) {
      this->offset_sec = offset_sec;
      this->m_offset_sec_isSet = true;
  }
  
  QString*
  OAITimezone_schema::getNowInDst() {
      return now_in_dst;
  }
  void
  OAITimezone_schema::setNowInDst(QString* now_in_dst) {
      this->now_in_dst = now_in_dst;
      this->m_now_in_dst_isSet = true;
  }
  
  QString*
  OAITimezone_schema::getName() {
      return name;
  }
  void
  OAITimezone_schema::setName(QString* name) {
      this->name = name;
      this->m_name_isSet = true;
  }
  
  
  bool
  OAITimezone_schema::isSet(){
      bool isObjectUpdated = false;
      do{
          if(short_name != nullptr && *short_name != QString("")){ isObjectUpdated = true; break;}
          if(offset_sec != nullptr && offset_sec->isSet()){ isObjectUpdated = true; break;}
          if(now_in_dst != nullptr && *now_in_dst != QString("")){ isObjectUpdated = true; break;}
          if(name != nullptr && *name != QString("")){ isObjectUpdated = true; break;}
      }while(false);
      return isObjectUpdated;
  }
  }
  
  