/**
 * Swaggy Jenkins
 * Jenkins API clients generated from Swagger / Open API specification
 *
 * OpenAPI spec version: 1.1.1
 * Contact: blah@cliffano.com
 *
 * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */



#include "Hudson.h"

#include <string>
#include <sstream>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>

using boost::property_tree::ptree;
using boost::property_tree::read_json;
using boost::property_tree::write_json;

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

Hudson::Hudson()
{
    m__class = "";
    m_Mode = "";
    m_NodeDescription = "";
    m_NodeName = "";
    m_NumExecutors = 0;
    m_Description = "";
    m_QuietingDown = false;
    m_SlaveAgentPort = 0;
    m_UseCrumbs = false;
    m_UseSecurity = false;
    
}

Hudson::~Hudson()
{
}

std::string Hudson::toJsonString()
{
	std::stringstream ss;
	ptree pt;
	pt.put("_class", m__class);
	pt.put("Mode", m_Mode);
	pt.put("NodeDescription", m_NodeDescription);
	pt.put("NodeName", m_NodeName);
	pt.put("NumExecutors", m_NumExecutors);
	pt.put("Description", m_Description);
	pt.put("QuietingDown", m_QuietingDown);
	pt.put("SlaveAgentPort", m_SlaveAgentPort);
	pt.put("UseCrumbs", m_UseCrumbs);
	pt.put("UseSecurity", m_UseSecurity);
	write_json(ss, pt, false);
	return ss.str();
}

void Hudson::fromJsonString(std::string const& jsonString)
{
	std::stringstream ss(jsonString);
	ptree pt;
	read_json(ss,pt);
	m__class = pt.get("_class", "");
	m_Mode = pt.get("Mode", "");
	m_NodeDescription = pt.get("NodeDescription", "");
	m_NodeName = pt.get("NodeName", "");
	m_NumExecutors = pt.get("NumExecutors", 0);
	m_Description = pt.get("Description", "");
	m_QuietingDown = pt.get("QuietingDown", false);
	m_SlaveAgentPort = pt.get("SlaveAgentPort", 0);
	m_UseCrumbs = pt.get("UseCrumbs", false);
	m_UseSecurity = pt.get("UseSecurity", false);
}

std::string Hudson::getClass() const
{
    return m__class;
}
void Hudson::setClass(std::string value)
{
    m__class = value;
}
std::vector<std::shared_ptr<HudsonassignedLabels>> Hudson::getAssignedLabels() const
{
    return m_AssignedLabels;
}
void Hudson::setAssignedLabels(std::vector<std::shared_ptr<HudsonassignedLabels>> value)
{
    m_AssignedLabels = value;
}
std::string Hudson::getMode() const
{
    return m_Mode;
}
void Hudson::setMode(std::string value)
{
    m_Mode = value;
}
std::string Hudson::getNodeDescription() const
{
    return m_NodeDescription;
}
void Hudson::setNodeDescription(std::string value)
{
    m_NodeDescription = value;
}
std::string Hudson::getNodeName() const
{
    return m_NodeName;
}
void Hudson::setNodeName(std::string value)
{
    m_NodeName = value;
}
int32_t Hudson::getNumExecutors() const
{
    return m_NumExecutors;
}
void Hudson::setNumExecutors(int32_t value)
{
    m_NumExecutors = value;
}
std::string Hudson::getDescription() const
{
    return m_Description;
}
void Hudson::setDescription(std::string value)
{
    m_Description = value;
}
std::vector<std::shared_ptr<FreeStyleProject>> Hudson::getJobs() const
{
    return m_Jobs;
}
void Hudson::setJobs(std::vector<std::shared_ptr<FreeStyleProject>> value)
{
    m_Jobs = value;
}
std::shared_ptr<AllView> Hudson::getPrimaryView() const
{
    return m_PrimaryView;
}
void Hudson::setPrimaryView(std::shared_ptr<AllView> value)
{
    m_PrimaryView = value;
}
bool Hudson::isQuietingDown() const
{
    return m_QuietingDown;
}
void Hudson::setQuietingDown(bool value)
{
    m_QuietingDown = value;
}
int32_t Hudson::getSlaveAgentPort() const
{
    return m_SlaveAgentPort;
}
void Hudson::setSlaveAgentPort(int32_t value)
{
    m_SlaveAgentPort = value;
}
std::shared_ptr<UnlabeledLoadStatistics> Hudson::getUnlabeledLoad() const
{
    return m_UnlabeledLoad;
}
void Hudson::setUnlabeledLoad(std::shared_ptr<UnlabeledLoadStatistics> value)
{
    m_UnlabeledLoad = value;
}
bool Hudson::isUseCrumbs() const
{
    return m_UseCrumbs;
}
void Hudson::setUseCrumbs(bool value)
{
    m_UseCrumbs = value;
}
bool Hudson::isUseSecurity() const
{
    return m_UseSecurity;
}
void Hudson::setUseSecurity(bool value)
{
    m_UseSecurity = value;
}
std::vector<std::shared_ptr<AllView>> Hudson::getViews() const
{
    return m_Views;
}
void Hudson::setViews(std::vector<std::shared_ptr<AllView>> value)
{
    m_Views = value;
}

}
}
}
}

