| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- /*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- #include <alibabacloud/smartag/model/ModifyACLRuleResult.h>
- #include <json/json.h>
- using namespace AlibabaCloud::Smartag;
- using namespace AlibabaCloud::Smartag::Model;
- ModifyACLRuleResult::ModifyACLRuleResult() :
- ServiceResult()
- {}
- ModifyACLRuleResult::ModifyACLRuleResult(const std::string &payload) :
- ServiceResult()
- {
- parse(payload);
- }
- ModifyACLRuleResult::~ModifyACLRuleResult()
- {}
- void ModifyACLRuleResult::parse(const std::string &payload)
- {
- Json::Reader reader;
- Json::Value value;
- reader.parse(payload, value);
- setRequestId(value["RequestId"].asString());
- if(!value["AcrId"].isNull())
- acrId_ = value["AcrId"].asString();
- if(!value["AclId"].isNull())
- aclId_ = value["AclId"].asString();
- if(!value["Description"].isNull())
- description_ = value["Description"].asString();
- if(!value["Direction"].isNull())
- direction_ = value["Direction"].asString();
- if(!value["SourceCidr"].isNull())
- sourceCidr_ = value["SourceCidr"].asString();
- if(!value["DestCidr"].isNull())
- destCidr_ = value["DestCidr"].asString();
- if(!value["IpProtocol"].isNull())
- ipProtocol_ = value["IpProtocol"].asString();
- if(!value["SourcePortRange"].isNull())
- sourcePortRange_ = value["SourcePortRange"].asString();
- if(!value["DestPortRange"].isNull())
- destPortRange_ = value["DestPortRange"].asString();
- if(!value["Policy"].isNull())
- policy_ = value["Policy"].asString();
- if(!value["Priority"].isNull())
- priority_ = std::stoi(value["Priority"].asString());
- if(!value["GmtCreate"].isNull())
- gmtCreate_ = std::stol(value["GmtCreate"].asString());
- if(!value["Name"].isNull())
- name_ = value["Name"].asString();
- }
- std::string ModifyACLRuleResult::getPolicy()const
- {
- return policy_;
- }
- std::string ModifyACLRuleResult::getDescription()const
- {
- return description_;
- }
- std::string ModifyACLRuleResult::getSourcePortRange()const
- {
- return sourcePortRange_;
- }
- std::string ModifyACLRuleResult::getSourceCidr()const
- {
- return sourceCidr_;
- }
- int ModifyACLRuleResult::getPriority()const
- {
- return priority_;
- }
- std::string ModifyACLRuleResult::getAclId()const
- {
- return aclId_;
- }
- std::string ModifyACLRuleResult::getAcrId()const
- {
- return acrId_;
- }
- std::string ModifyACLRuleResult::getDestPortRange()const
- {
- return destPortRange_;
- }
- std::string ModifyACLRuleResult::getDirection()const
- {
- return direction_;
- }
- std::string ModifyACLRuleResult::getName()const
- {
- return name_;
- }
- long ModifyACLRuleResult::getGmtCreate()const
- {
- return gmtCreate_;
- }
- std::string ModifyACLRuleResult::getDestCidr()const
- {
- return destCidr_;
- }
- std::string ModifyACLRuleResult::getIpProtocol()const
- {
- return ipProtocol_;
- }
|