#include "huaweicloud/cfw/v1/model/DeleteServiceSetUsingDeleteRequest.h"
namespace HuaweiCloud {
namespace Sdk {
namespace Cfw {
namespace V1 {
namespace Model {
DeleteServiceSetUsingDeleteRequest::DeleteServiceSetUsingDeleteRequest()
{
setId_ = "";
setIdIsSet_ = false;
enterpriseProjectId_ = "";
enterpriseProjectIdIsSet_ = false;
fwInstanceId_ = "";
fwInstanceIdIsSet_ = false;
}
DeleteServiceSetUsingDeleteRequest::~DeleteServiceSetUsingDeleteRequest() = default;
void DeleteServiceSetUsingDeleteRequest::validate()
{
}
web::json::value DeleteServiceSetUsingDeleteRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(setIdIsSet_) {
val[utility::conversions::to_string_t("set_id")] = ModelBase::toJson(setId_);
}
if(enterpriseProjectIdIsSet_) {
val[utility::conversions::to_string_t("enterprise_project_id")] = ModelBase::toJson(enterpriseProjectId_);
}
if(fwInstanceIdIsSet_) {
val[utility::conversions::to_string_t("fw_instance_id")] = ModelBase::toJson(fwInstanceId_);
}
return val;
}
bool DeleteServiceSetUsingDeleteRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t("set_id"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("set_id"));
if(!fieldValue.is_null())
{
std::string refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setSetId(refVal);
}
}
if(val.has_field(utility::conversions::to_string_t("enterprise_project_id"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("enterprise_project_id"));
if(!fieldValue.is_null())
{
std::string refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setEnterpriseProjectId(refVal);
}
}
if(val.has_field(utility::conversions::to_string_t("fw_instance_id"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("fw_instance_id"));
if(!fieldValue.is_null())
{
std::string refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setFwInstanceId(refVal);
}
}
return ok;
}
std::string DeleteServiceSetUsingDeleteRequest::getSetId() const
{
return setId_;
}
void DeleteServiceSetUsingDeleteRequest::setSetId(const std::string& value)
{
setId_ = value;
setIdIsSet_ = true;
}
bool DeleteServiceSetUsingDeleteRequest::setIdIsSet() const
{
return setIdIsSet_;
}
void DeleteServiceSetUsingDeleteRequest::unsetsetId()
{
setIdIsSet_ = false;
}
std::string DeleteServiceSetUsingDeleteRequest::getEnterpriseProjectId() const
{
return enterpriseProjectId_;
}
void DeleteServiceSetUsingDeleteRequest::setEnterpriseProjectId(const std::string& value)
{
enterpriseProjectId_ = value;
enterpriseProjectIdIsSet_ = true;
}
bool DeleteServiceSetUsingDeleteRequest::enterpriseProjectIdIsSet() const
{
return enterpriseProjectIdIsSet_;
}
void DeleteServiceSetUsingDeleteRequest::unsetenterpriseProjectId()
{
enterpriseProjectIdIsSet_ = false;
}
std::string DeleteServiceSetUsingDeleteRequest::getFwInstanceId() const
{
return fwInstanceId_;
}
void DeleteServiceSetUsingDeleteRequest::setFwInstanceId(const std::string& value)
{
fwInstanceId_ = value;
fwInstanceIdIsSet_ = true;
}
bool DeleteServiceSetUsingDeleteRequest::fwInstanceIdIsSet() const
{
return fwInstanceIdIsSet_;
}
void DeleteServiceSetUsingDeleteRequest::unsetfwInstanceId()
{
fwInstanceIdIsSet_ = false;
}
}
}
}
}
}