<gh_stars>1-10
/**
* Cloud Manager API
* This API allows access to Cloud Manager programs, pipelines, and environments by an authorized technical account created through the Adobe I/O Console. The base url for this API is https://cloudmanager.adobe.io, e.g. to get the list of programs for an organization, you would make a GET request to https://cloudmanager.adobe.io/api/programs (with the correct set of headers as described below). This swagger file can be downloaded from https://raw.githubusercontent.com/AdobeDocs/cloudmanager-api-docs/master/swagger-specs/api.yaml.
*
* The version of the OpenAPI document: 1.0.0
* Contact: <EMAIL>
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


#include "Pipeline.h"

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

Pipeline::Pipeline()
{
    m_Id = "";
    m_IdIsSet = false;
    m_ProgramId = "";
    m_ProgramIdIsSet = false;
    m_Name = "";
    m_Trigger = "";
    m_TriggerIsSet = false;
    m_Status = "";
    m_StatusIsSet = false;
    m_CreatedAt = "";
    m_CreatedAtIsSet = false;
    m_UpdatedAt = "";
    m_UpdatedAtIsSet = false;
    m_LastStartedAt = "";
    m_LastStartedAtIsSet = false;
    m_LastFinishedAt = "";
    m_LastFinishedAtIsSet = false;
    m__linksIsSet = false;
    
}

Pipeline::~Pipeline()
{
}

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

void to_json(nlohmann::json& j, const Pipeline& o)
{
    j = nlohmann::json();
    if(o.idIsSet())
        j["id"] = o.m_Id;
    if(o.programIdIsSet())
        j["programId"] = o.m_ProgramId;
    j["name"] = o.m_Name;
    if(o.triggerIsSet())
        j["trigger"] = o.m_Trigger;
    if(o.statusIsSet())
        j["status"] = o.m_Status;
    if(o.createdAtIsSet())
        j["createdAt"] = o.m_CreatedAt;
    if(o.updatedAtIsSet())
        j["updatedAt"] = o.m_UpdatedAt;
    if(o.lastStartedAtIsSet())
        j["lastStartedAt"] = o.m_LastStartedAt;
    if(o.lastFinishedAtIsSet())
        j["lastFinishedAt"] = o.m_LastFinishedAt;
    j["phases"] = o.m_Phases;
    if(o.linksIsSet())
        j["_links"] = o.m__links;
}

void from_json(const nlohmann::json& j, Pipeline& o)
{
    if(j.find("id") != j.end())
    {
        j.at("id").get_to(o.m_Id);
        o.m_IdIsSet = true;
    } 
    if(j.find("programId") != j.end())
    {
        j.at("programId").get_to(o.m_ProgramId);
        o.m_ProgramIdIsSet = true;
    } 
    j.at("name").get_to(o.m_Name);
    if(j.find("trigger") != j.end())
    {
        j.at("trigger").get_to(o.m_Trigger);
        o.m_TriggerIsSet = true;
    } 
    if(j.find("status") != j.end())
    {
        j.at("status").get_to(o.m_Status);
        o.m_StatusIsSet = true;
    } 
    if(j.find("createdAt") != j.end())
    {
        j.at("createdAt").get_to(o.m_CreatedAt);
        o.m_CreatedAtIsSet = true;
    } 
    if(j.find("updatedAt") != j.end())
    {
        j.at("updatedAt").get_to(o.m_UpdatedAt);
        o.m_UpdatedAtIsSet = true;
    } 
    if(j.find("lastStartedAt") != j.end())
    {
        j.at("lastStartedAt").get_to(o.m_LastStartedAt);
        o.m_LastStartedAtIsSet = true;
    } 
    if(j.find("lastFinishedAt") != j.end())
    {
        j.at("lastFinishedAt").get_to(o.m_LastFinishedAt);
        o.m_LastFinishedAtIsSet = true;
    } 
    j.at("phases").get_to(o.m_Phases);
    if(j.find("_links") != j.end())
    {
        j.at("_links").get_to(o.m__links);
        o.m__linksIsSet = true;
    } 
}

std::string Pipeline::getId() const
{
    return m_Id;
}
void Pipeline::setId(std::string const& value)
{
    m_Id = value;
    m_IdIsSet = true;
}
bool Pipeline::idIsSet() const
{
    return m_IdIsSet;
}
void Pipeline::unsetId()
{
    m_IdIsSet = false;
}
std::string Pipeline::getProgramId() const
{
    return m_ProgramId;
}
void Pipeline::setProgramId(std::string const& value)
{
    m_ProgramId = value;
    m_ProgramIdIsSet = true;
}
bool Pipeline::programIdIsSet() const
{
    return m_ProgramIdIsSet;
}
void Pipeline::unsetProgramId()
{
    m_ProgramIdIsSet = false;
}
std::string Pipeline::getName() const
{
    return m_Name;
}
void Pipeline::setName(std::string const& value)
{
    m_Name = value;
}
std::string Pipeline::getTrigger() const
{
    return m_Trigger;
}
void Pipeline::setTrigger(std::string const& value)
{
    m_Trigger = value;
    m_TriggerIsSet = true;
}
bool Pipeline::triggerIsSet() const
{
    return m_TriggerIsSet;
}
void Pipeline::unsetTrigger()
{
    m_TriggerIsSet = false;
}
std::string Pipeline::getStatus() const
{
    return m_Status;
}
void Pipeline::setStatus(std::string const& value)
{
    m_Status = value;
    m_StatusIsSet = true;
}
bool Pipeline::statusIsSet() const
{
    return m_StatusIsSet;
}
void Pipeline::unsetStatus()
{
    m_StatusIsSet = false;
}
std::string Pipeline::getCreatedAt() const
{
    return m_CreatedAt;
}
void Pipeline::setCreatedAt(std::string const& value)
{
    m_CreatedAt = value;
    m_CreatedAtIsSet = true;
}
bool Pipeline::createdAtIsSet() const
{
    return m_CreatedAtIsSet;
}
void Pipeline::unsetCreatedAt()
{
    m_CreatedAtIsSet = false;
}
std::string Pipeline::getUpdatedAt() const
{
    return m_UpdatedAt;
}
void Pipeline::setUpdatedAt(std::string const& value)
{
    m_UpdatedAt = value;
    m_UpdatedAtIsSet = true;
}
bool Pipeline::updatedAtIsSet() const
{
    return m_UpdatedAtIsSet;
}
void Pipeline::unsetUpdatedAt()
{
    m_UpdatedAtIsSet = false;
}
std::string Pipeline::getLastStartedAt() const
{
    return m_LastStartedAt;
}
void Pipeline::setLastStartedAt(std::string const& value)
{
    m_LastStartedAt = value;
    m_LastStartedAtIsSet = true;
}
bool Pipeline::lastStartedAtIsSet() const
{
    return m_LastStartedAtIsSet;
}
void Pipeline::unsetLastStartedAt()
{
    m_LastStartedAtIsSet = false;
}
std::string Pipeline::getLastFinishedAt() const
{
    return m_LastFinishedAt;
}
void Pipeline::setLastFinishedAt(std::string const& value)
{
    m_LastFinishedAt = value;
    m_LastFinishedAtIsSet = true;
}
bool Pipeline::lastFinishedAtIsSet() const
{
    return m_LastFinishedAtIsSet;
}
void Pipeline::unsetLastFinishedAt()
{
    m_LastFinishedAtIsSet = false;
}
std::vector<PipelinePhase>& Pipeline::getPhases()
{
    return m_Phases;
}
void Pipeline::setPhases(std::vector<PipelinePhase> const& value)
{
    m_Phases = value;
}
Pipeline__links Pipeline::getLinks() const
{
    return m__links;
}
void Pipeline::setLinks(Pipeline__links const& value)
{
    m__links = value;
    m__linksIsSet = true;
}
bool Pipeline::linksIsSet() const
{
    return m__linksIsSet;
}
void Pipeline::unset_links()
{
    m__linksIsSet = false;
}

}
}
}
}

