text: /**
   * Swaggy Jenkins
   * Jenkins API clients generated from Swagger / Open API specification
   *
   * The version of the OpenAPI document: 1.1.2-pre.0
   * Contact: blah@cliffano.com
   *
   * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0.
   * https://openapi-generator.tech
   * Do not edit the class manually.
   */
  
  
  
  #include "PipelineRunImpllinks.h"
  
  #include <string>
  #include <vector>
  #include <sstream>
  #include <stdexcept>
  #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 {
  
  PipelineRunImpllinks::PipelineRunImpllinks(boost::property_tree::ptree const& pt)
  {
          fromPropertyTree(pt);
  }
  
  std::string PipelineRunImpllinks::toJsonString(bool prettyJson /* = false */)
  {
      return toJsonString_internal(prettyJson);
  }
  
  void PipelineRunImpllinks::fromJsonString(std::string const& jsonString)
  {
      fromJsonString_internal(jsonString);
  }
  
  boost::property_tree::ptree PipelineRunImpllinks::toPropertyTree()
  {
      return toPropertyTree_internal();
  }
  
  void PipelineRunImpllinks::fromPropertyTree(boost::property_tree::ptree const& pt)
  {
      fromPropertyTree_internal(pt);
  }
  
  std::string PipelineRunImpllinks::toJsonString_internal(bool prettyJson)
  {
  	std::stringstream ss;
  	write_json(ss, this->toPropertyTree(), prettyJson);
  	return ss.str();
  }
  
  void PipelineRunImpllinks::fromJsonString_internal(std::string const& jsonString)
  {
  	std::stringstream ss(jsonString);
  	ptree pt;
  	read_json(ss,pt);
  	this->fromPropertyTree(pt);
  }
  
  ptree PipelineRunImpllinks::toPropertyTree_internal()
  {
  	ptree pt;
  	ptree tmp_node;
  	if (m_Nodes != nullptr) {
  		pt.add_child("nodes", m_Nodes->toPropertyTree());
  	}
  	if (m_Log != nullptr) {
  		pt.add_child("log", m_Log->toPropertyTree());
  	}
  	if (m_Self != nullptr) {
  		pt.add_child("self", m_Self->toPropertyTree());
  	}
  	if (m_Actions != nullptr) {
  		pt.add_child("actions", m_Actions->toPropertyTree());
  	}
  	if (m_Steps != nullptr) {
  		pt.add_child("steps", m_Steps->toPropertyTree());
  	}
  	pt.put("_class", m__class);
  	return pt;
  }
  
  void PipelineRunImpllinks::fromPropertyTree_internal(ptree const &pt)
  {
  	ptree tmp_node;
  	if (pt.get_child_optional("nodes")) {
  		m_Nodes = std::make_shared<Link>();
  		m_Nodes->fromPropertyTree(pt.get_child("nodes"));
  	}
  	if (pt.get_child_optional("log")) {
  		m_Log = std::make_shared<Link>();
  		m_Log->fromPropertyTree(pt.get_child("log"));
  	}
  	if (pt.get_child_optional("self")) {
  		m_Self = std::make_shared<Link>();
  		m_Self->fromPropertyTree(pt.get_child("self"));
  	}
  	if (pt.get_child_optional("actions")) {
  		m_Actions = std::make_shared<Link>();
  		m_Actions->fromPropertyTree(pt.get_child("actions"));
  	}
  	if (pt.get_child_optional("steps")) {
  		m_Steps = std::make_shared<Link>();
  		m_Steps->fromPropertyTree(pt.get_child("steps"));
  	}
  	m__class = pt.get("_class", "");
  }
  
  std::shared_ptr<Link> PipelineRunImpllinks::getNodes() const
  {
      return m_Nodes;
  }
  
  void PipelineRunImpllinks::setNodes(std::shared_ptr<Link> value)
  {
  	m_Nodes = value;
  }
  std::shared_ptr<Link> PipelineRunImpllinks::getLog() const
  {
      return m_Log;
  }
  
  void PipelineRunImpllinks::setLog(std::shared_ptr<Link> value)
  {
  	m_Log = value;
  }
  std::shared_ptr<Link> PipelineRunImpllinks::getSelf() const
  {
      return m_Self;
  }
  
  void PipelineRunImpllinks::setSelf(std::shared_ptr<Link> value)
  {
  	m_Self = value;
  }
  std::shared_ptr<Link> PipelineRunImpllinks::getActions() const
  {
      return m_Actions;
  }
  
  void PipelineRunImpllinks::setActions(std::shared_ptr<Link> value)
  {
  	m_Actions = value;
  }
  std::shared_ptr<Link> PipelineRunImpllinks::getSteps() const
  {
      return m_Steps;
  }
  
  void PipelineRunImpllinks::setSteps(std::shared_ptr<Link> value)
  {
  	m_Steps = value;
  }
  std::string PipelineRunImpllinks::get_Class() const
  {
      return m__class;
  }
  
  void PipelineRunImpllinks::set_Class(std::string value)
  {
  	m__class = value;
  }
  
  std::vector<PipelineRunImpllinks> createPipelineRunImpllinksVectorFromJsonString(const std::string& json)
  {
      std::stringstream sstream(json);
      boost::property_tree::ptree pt;
      boost::property_tree::json_parser::read_json(sstream,pt);
  
      auto vec = std::vector<PipelineRunImpllinks>();
      for (const auto& child: pt) {
          vec.emplace_back(PipelineRunImpllinks(child.second));
      }
  
      return vec;
  }
  
  }
  }
  }
  }
  
  