/**
* Nudsf_DataRepository
* Nudsf Data Repository Service. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. 
*
* The version of the OpenAPI document: 1.1.0-alpha.2
* 
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


#include "SearchExpression.h"

namespace org {
namespace openapitools {
namespace server {
namespace model {

SearchExpression::SearchExpression()
{
    m_SchemaId = "";
    m_SchemaIdIsSet = false;
    m_Tag = "";
    m_Value = "";
    
}

SearchExpression::~SearchExpression()
{
}

void SearchExpression::validate()
{
    // TODO: implement validation
}

void to_json(nlohmann::json& j, const SearchExpression& o)
{
    j = nlohmann::json();
    j["cond"] = o.m_Cond;
    j["units"] = o.m_Units;
    if(o.schemaIdIsSet())
        j["schemaId"] = o.m_SchemaId;
    j["op"] = o.m_Op;
    j["tag"] = o.m_Tag;
    j["value"] = o.m_Value;
}

void from_json(const nlohmann::json& j, SearchExpression& o)
{
    j.at("cond").get_to(o.m_Cond);
    j.at("units").get_to(o.m_Units);
    if(j.find("schemaId") != j.end())
    {
        j.at("schemaId").get_to(o.m_SchemaId);
        o.m_SchemaIdIsSet = true;
    } 
    j.at("op").get_to(o.m_Op);
    j.at("tag").get_to(o.m_Tag);
    j.at("value").get_to(o.m_Value);
}

ConditionOperator SearchExpression::getCond() const
{
    return m_Cond;
}
void SearchExpression::setCond(ConditionOperator const& value)
{
    m_Cond = value;
}
std::vector<SearchExpression>& SearchExpression::getUnits()
{
    return m_Units;
}
void SearchExpression::setUnits(std::vector<SearchExpression> const& value)
{
    m_Units = value;
}
std::string SearchExpression::getSchemaId() const
{
    return m_SchemaId;
}
void SearchExpression::setSchemaId(std::string const& value)
{
    m_SchemaId = value;
    m_SchemaIdIsSet = true;
}
bool SearchExpression::schemaIdIsSet() const
{
    return m_SchemaIdIsSet;
}
void SearchExpression::unsetSchemaId()
{
    m_SchemaIdIsSet = false;
}
ComparisonOperator SearchExpression::getOp() const
{
    return m_Op;
}
void SearchExpression::setOp(ComparisonOperator const& value)
{
    m_Op = value;
}
std::string SearchExpression::getTag() const
{
    return m_Tag;
}
void SearchExpression::setTag(std::string const& value)
{
    m_Tag = value;
}
std::string SearchExpression::getValue() const
{
    return m_Value;
}
void SearchExpression::setValue(std::string const& value)
{
    m_Value = value;
}

}
}
}
}

