/**
* 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 "Record.h"

namespace oai {
namespace amf {
namespace model {

Record::Record()
{
    m_BlocksIsSet = false;
    
}

Record::~Record()
{
}

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

void to_json(nlohmann::json& j, const Record& o)
{
    j = nlohmann::json();
    j["meta"] = o.m_Meta;
    if(o.blocksIsSet() || !o.m_Blocks.empty())
         j["blocks"] = o.m_Blocks;
}

void from_json(const nlohmann::json& j, Record& o)
{
    j.at("meta").get_to(o.m_Meta);
    if(j.find("blocks") != j.end())
    {
        j.at("blocks").get_to(o.m_Blocks);
        o.m_BlocksIsSet = true;
    } 
}

RecordMeta Record::getMeta() const
{
    return m_Meta;
}
void Record::setMeta(RecordMeta const& value)
{
    m_Meta = value;
}
std::set<nlohmann::json> Record::getBlocks() const
{
    return m_Blocks;
}
void Record::setBlocks(std::set<nlohmann::json> const& value)
{
   m_Blocks = value;
   m_BlocksIsSet = true;
}
bool Record::blocksIsSet() const
{
    return m_BlocksIsSet;
}
void Record::unsetBlocks()
{
    m_BlocksIsSet = false;
}

}
}
}

