ONS SDK Auto Released By wenting.ywt,Version:1.34.63
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
71
ons/src/model/OnsConsumerAccumulateRequest.cc
Normal file
71
ons/src/model/OnsConsumerAccumulateRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerAccumulateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsConsumerAccumulateRequest;
|
||||
|
||||
OnsConsumerAccumulateRequest::OnsConsumerAccumulateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsConsumerAccumulate")
|
||||
{}
|
||||
|
||||
OnsConsumerAccumulateRequest::~OnsConsumerAccumulateRequest()
|
||||
{}
|
||||
|
||||
long OnsConsumerAccumulateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsConsumerAccumulateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsConsumerAccumulateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsConsumerAccumulateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsConsumerAccumulateRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsConsumerAccumulateRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
bool OnsConsumerAccumulateRequest::getDetail()const
|
||||
{
|
||||
return detail_;
|
||||
}
|
||||
|
||||
void OnsConsumerAccumulateRequest::setDetail(bool detail)
|
||||
{
|
||||
detail_ = detail;
|
||||
setParameter("Detail", detail ? "true" : "false");
|
||||
}
|
||||
|
||||
82
ons/src/model/OnsConsumerAccumulateResult.cc
Normal file
82
ons/src/model/OnsConsumerAccumulateResult.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerAccumulateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsConsumerAccumulateResult::OnsConsumerAccumulateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsConsumerAccumulateResult::OnsConsumerAccumulateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsConsumerAccumulateResult::~OnsConsumerAccumulateResult()
|
||||
{}
|
||||
|
||||
void OnsConsumerAccumulateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Online"].isNull())
|
||||
data_.online = dataNode["Online"].asString() == "true";
|
||||
if(!dataNode["TotalDiff"].isNull())
|
||||
data_.totalDiff = std::stol(dataNode["TotalDiff"].asString());
|
||||
if(!dataNode["ConsumeTps"].isNull())
|
||||
data_.consumeTps = std::stof(dataNode["ConsumeTps"].asString());
|
||||
if(!dataNode["LastTimestamp"].isNull())
|
||||
data_.lastTimestamp = std::stol(dataNode["LastTimestamp"].asString());
|
||||
if(!dataNode["DelayTime"].isNull())
|
||||
data_.delayTime = std::stol(dataNode["DelayTime"].asString());
|
||||
auto allDetailInTopicList = value["DetailInTopicList"]["DetailInTopicDo"];
|
||||
for (auto value : allDetailInTopicList)
|
||||
{
|
||||
Data::DetailInTopicDo detailInTopicDoObject;
|
||||
if(!value["Topic"].isNull())
|
||||
detailInTopicDoObject.topic = value["Topic"].asString();
|
||||
if(!value["TotalDiff"].isNull())
|
||||
detailInTopicDoObject.totalDiff = std::stol(value["TotalDiff"].asString());
|
||||
if(!value["LastTimestamp"].isNull())
|
||||
detailInTopicDoObject.lastTimestamp = std::stol(value["LastTimestamp"].asString());
|
||||
if(!value["DelayTime"].isNull())
|
||||
detailInTopicDoObject.delayTime = std::stol(value["DelayTime"].asString());
|
||||
data_.detailInTopicList.push_back(detailInTopicDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsConsumerAccumulateResult::Data OnsConsumerAccumulateResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsConsumerAccumulateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsConsumerGetConnectionRequest.cc
Normal file
60
ons/src/model/OnsConsumerGetConnectionRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerGetConnectionRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsConsumerGetConnectionRequest;
|
||||
|
||||
OnsConsumerGetConnectionRequest::OnsConsumerGetConnectionRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsConsumerGetConnection")
|
||||
{}
|
||||
|
||||
OnsConsumerGetConnectionRequest::~OnsConsumerGetConnectionRequest()
|
||||
{}
|
||||
|
||||
long OnsConsumerGetConnectionRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsConsumerGetConnectionRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsConsumerGetConnectionRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsConsumerGetConnectionRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsConsumerGetConnectionRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsConsumerGetConnectionRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
72
ons/src/model/OnsConsumerGetConnectionResult.cc
Normal file
72
ons/src/model/OnsConsumerGetConnectionResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerGetConnectionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsConsumerGetConnectionResult::OnsConsumerGetConnectionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsConsumerGetConnectionResult::OnsConsumerGetConnectionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsConsumerGetConnectionResult::~OnsConsumerGetConnectionResult()
|
||||
{}
|
||||
|
||||
void OnsConsumerGetConnectionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allConnectionList = value["ConnectionList"]["ConnectionDo"];
|
||||
for (auto value : allConnectionList)
|
||||
{
|
||||
Data::ConnectionDo connectionDoObject;
|
||||
if(!value["ClientId"].isNull())
|
||||
connectionDoObject.clientId = value["ClientId"].asString();
|
||||
if(!value["ClientAddr"].isNull())
|
||||
connectionDoObject.clientAddr = value["ClientAddr"].asString();
|
||||
if(!value["Language"].isNull())
|
||||
connectionDoObject.language = value["Language"].asString();
|
||||
if(!value["Version"].isNull())
|
||||
connectionDoObject.version = value["Version"].asString();
|
||||
data_.connectionList.push_back(connectionDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsConsumerGetConnectionResult::Data OnsConsumerGetConnectionResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsConsumerGetConnectionResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
93
ons/src/model/OnsConsumerResetOffsetRequest.cc
Normal file
93
ons/src/model/OnsConsumerResetOffsetRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerResetOffsetRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsConsumerResetOffsetRequest;
|
||||
|
||||
OnsConsumerResetOffsetRequest::OnsConsumerResetOffsetRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsConsumerResetOffset")
|
||||
{}
|
||||
|
||||
OnsConsumerResetOffsetRequest::~OnsConsumerResetOffsetRequest()
|
||||
{}
|
||||
|
||||
long OnsConsumerResetOffsetRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsConsumerResetOffsetRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsConsumerResetOffsetRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsConsumerResetOffsetRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsConsumerResetOffsetRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsConsumerResetOffsetRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsConsumerResetOffsetRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsConsumerResetOffsetRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
long OnsConsumerResetOffsetRequest::getResetTimestamp()const
|
||||
{
|
||||
return resetTimestamp_;
|
||||
}
|
||||
|
||||
void OnsConsumerResetOffsetRequest::setResetTimestamp(long resetTimestamp)
|
||||
{
|
||||
resetTimestamp_ = resetTimestamp;
|
||||
setParameter("ResetTimestamp", std::to_string(resetTimestamp));
|
||||
}
|
||||
|
||||
int OnsConsumerResetOffsetRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void OnsConsumerResetOffsetRequest::setType(int type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", std::to_string(type));
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsConsumerResetOffsetResult.cc
Normal file
52
ons/src/model/OnsConsumerResetOffsetResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerResetOffsetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsConsumerResetOffsetResult::OnsConsumerResetOffsetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsConsumerResetOffsetResult::OnsConsumerResetOffsetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsConsumerResetOffsetResult::~OnsConsumerResetOffsetResult()
|
||||
{}
|
||||
|
||||
void OnsConsumerResetOffsetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsConsumerResetOffsetResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
82
ons/src/model/OnsConsumerStatusRequest.cc
Normal file
82
ons/src/model/OnsConsumerStatusRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsConsumerStatusRequest;
|
||||
|
||||
OnsConsumerStatusRequest::OnsConsumerStatusRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsConsumerStatus")
|
||||
{}
|
||||
|
||||
OnsConsumerStatusRequest::~OnsConsumerStatusRequest()
|
||||
{}
|
||||
|
||||
long OnsConsumerStatusRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsConsumerStatusRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsConsumerStatusRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsConsumerStatusRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
bool OnsConsumerStatusRequest::getNeedJstack()const
|
||||
{
|
||||
return needJstack_;
|
||||
}
|
||||
|
||||
void OnsConsumerStatusRequest::setNeedJstack(bool needJstack)
|
||||
{
|
||||
needJstack_ = needJstack;
|
||||
setParameter("NeedJstack", needJstack ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string OnsConsumerStatusRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsConsumerStatusRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
bool OnsConsumerStatusRequest::getDetail()const
|
||||
{
|
||||
return detail_;
|
||||
}
|
||||
|
||||
void OnsConsumerStatusRequest::setDetail(bool detail)
|
||||
{
|
||||
detail_ = detail;
|
||||
setParameter("Detail", detail ? "true" : "false");
|
||||
}
|
||||
|
||||
172
ons/src/model/OnsConsumerStatusResult.cc
Normal file
172
ons/src/model/OnsConsumerStatusResult.cc
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsConsumerStatusResult::OnsConsumerStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsConsumerStatusResult::OnsConsumerStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsConsumerStatusResult::~OnsConsumerStatusResult()
|
||||
{}
|
||||
|
||||
void OnsConsumerStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Online"].isNull())
|
||||
data_.online = dataNode["Online"].asString() == "true";
|
||||
if(!dataNode["TotalDiff"].isNull())
|
||||
data_.totalDiff = std::stol(dataNode["TotalDiff"].asString());
|
||||
if(!dataNode["ConsumeTps"].isNull())
|
||||
data_.consumeTps = std::stof(dataNode["ConsumeTps"].asString());
|
||||
if(!dataNode["LastTimestamp"].isNull())
|
||||
data_.lastTimestamp = std::stol(dataNode["LastTimestamp"].asString());
|
||||
if(!dataNode["DelayTime"].isNull())
|
||||
data_.delayTime = std::stol(dataNode["DelayTime"].asString());
|
||||
if(!dataNode["ConsumeModel"].isNull())
|
||||
data_.consumeModel = dataNode["ConsumeModel"].asString();
|
||||
if(!dataNode["SubscriptionSame"].isNull())
|
||||
data_.subscriptionSame = dataNode["SubscriptionSame"].asString() == "true";
|
||||
if(!dataNode["RebalanceOK"].isNull())
|
||||
data_.rebalanceOK = dataNode["RebalanceOK"].asString() == "true";
|
||||
if(!dataNode["InstanceId"].isNull())
|
||||
data_.instanceId = dataNode["InstanceId"].asString();
|
||||
auto allConnectionSet = value["ConnectionSet"]["ConnectionDo"];
|
||||
for (auto value : allConnectionSet)
|
||||
{
|
||||
Data::ConnectionDo connectionDoObject;
|
||||
if(!value["ClientId"].isNull())
|
||||
connectionDoObject.clientId = value["ClientId"].asString();
|
||||
if(!value["ClientAddr"].isNull())
|
||||
connectionDoObject.clientAddr = value["ClientAddr"].asString();
|
||||
if(!value["Language"].isNull())
|
||||
connectionDoObject.language = value["Language"].asString();
|
||||
if(!value["Version"].isNull())
|
||||
connectionDoObject.version = value["Version"].asString();
|
||||
data_.connectionSet.push_back(connectionDoObject);
|
||||
}
|
||||
auto allDetailInTopicList = value["DetailInTopicList"]["DetailInTopicDo"];
|
||||
for (auto value : allDetailInTopicList)
|
||||
{
|
||||
Data::DetailInTopicDo detailInTopicDoObject;
|
||||
if(!value["Topic"].isNull())
|
||||
detailInTopicDoObject.topic = value["Topic"].asString();
|
||||
if(!value["TotalDiff"].isNull())
|
||||
detailInTopicDoObject.totalDiff = std::stol(value["TotalDiff"].asString());
|
||||
if(!value["LastTimestamp"].isNull())
|
||||
detailInTopicDoObject.lastTimestamp = std::stol(value["LastTimestamp"].asString());
|
||||
if(!value["DelayTime"].isNull())
|
||||
detailInTopicDoObject.delayTime = std::stol(value["DelayTime"].asString());
|
||||
data_.detailInTopicList.push_back(detailInTopicDoObject);
|
||||
}
|
||||
auto allConsumerConnectionInfoList = value["ConsumerConnectionInfoList"]["ConsumerConnectionInfoDo"];
|
||||
for (auto value : allConsumerConnectionInfoList)
|
||||
{
|
||||
Data::ConsumerConnectionInfoDo consumerConnectionInfoDoObject;
|
||||
if(!value["ClientId"].isNull())
|
||||
consumerConnectionInfoDoObject.clientId = value["ClientId"].asString();
|
||||
if(!value["Connection"].isNull())
|
||||
consumerConnectionInfoDoObject.connection = value["Connection"].asString();
|
||||
if(!value["Language"].isNull())
|
||||
consumerConnectionInfoDoObject.language = value["Language"].asString();
|
||||
if(!value["Version"].isNull())
|
||||
consumerConnectionInfoDoObject.version = value["Version"].asString();
|
||||
if(!value["ConsumeModel"].isNull())
|
||||
consumerConnectionInfoDoObject.consumeModel = value["ConsumeModel"].asString();
|
||||
if(!value["ConsumeType"].isNull())
|
||||
consumerConnectionInfoDoObject.consumeType = value["ConsumeType"].asString();
|
||||
if(!value["ThreadCount"].isNull())
|
||||
consumerConnectionInfoDoObject.threadCount = std::stoi(value["ThreadCount"].asString());
|
||||
if(!value["StartTimeStamp"].isNull())
|
||||
consumerConnectionInfoDoObject.startTimeStamp = std::stol(value["StartTimeStamp"].asString());
|
||||
if(!value["LastTimeStamp"].isNull())
|
||||
consumerConnectionInfoDoObject.lastTimeStamp = std::stol(value["LastTimeStamp"].asString());
|
||||
auto allSubscriptionSet = value["SubscriptionSet"]["SubscriptionData"];
|
||||
for (auto value : allSubscriptionSet)
|
||||
{
|
||||
Data::ConsumerConnectionInfoDo::SubscriptionData subscriptionSetObject;
|
||||
if(!value["Topic"].isNull())
|
||||
subscriptionSetObject.topic = value["Topic"].asString();
|
||||
if(!value["SubString"].isNull())
|
||||
subscriptionSetObject.subString = value["SubString"].asString();
|
||||
if(!value["SubVersion"].isNull())
|
||||
subscriptionSetObject.subVersion = std::stol(value["SubVersion"].asString());
|
||||
auto allTagsSet = value["TagsSet"]["Tag"];
|
||||
for (auto value : allTagsSet)
|
||||
subscriptionSetObject.tagsSet.push_back(value.asString());
|
||||
consumerConnectionInfoDoObject.subscriptionSet.push_back(subscriptionSetObject);
|
||||
}
|
||||
auto allRunningDataList = value["RunningDataList"]["ConsumerRunningDataDo"];
|
||||
for (auto value : allRunningDataList)
|
||||
{
|
||||
Data::ConsumerConnectionInfoDo::ConsumerRunningDataDo runningDataListObject;
|
||||
if(!value["GroupId"].isNull())
|
||||
runningDataListObject.groupId = value["GroupId"].asString();
|
||||
if(!value["Topic"].isNull())
|
||||
runningDataListObject.topic = value["Topic"].asString();
|
||||
if(!value["Rt"].isNull())
|
||||
runningDataListObject.rt = std::stof(value["Rt"].asString());
|
||||
if(!value["OkTps"].isNull())
|
||||
runningDataListObject.okTps = std::stof(value["OkTps"].asString());
|
||||
if(!value["FailedTps"].isNull())
|
||||
runningDataListObject.failedTps = std::stof(value["FailedTps"].asString());
|
||||
if(!value["FailedCountPerHour"].isNull())
|
||||
runningDataListObject.failedCountPerHour = std::stol(value["FailedCountPerHour"].asString());
|
||||
consumerConnectionInfoDoObject.runningDataList.push_back(runningDataListObject);
|
||||
}
|
||||
auto allJstack = value["Jstack"]["ThreadTrackDo"];
|
||||
for (auto value : allJstack)
|
||||
{
|
||||
Data::ConsumerConnectionInfoDo::ThreadTrackDo jstackObject;
|
||||
if(!value["Thread"].isNull())
|
||||
jstackObject.thread = value["Thread"].asString();
|
||||
auto allTrackList = value["TrackList"]["Track"];
|
||||
for (auto value : allTrackList)
|
||||
jstackObject.trackList.push_back(value.asString());
|
||||
consumerConnectionInfoDoObject.jstack.push_back(jstackObject);
|
||||
}
|
||||
data_.consumerConnectionInfoList.push_back(consumerConnectionInfoDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsConsumerStatusResult::Data OnsConsumerStatusResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsConsumerStatusResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsConsumerTimeSpanRequest.cc
Normal file
71
ons/src/model/OnsConsumerTimeSpanRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerTimeSpanRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsConsumerTimeSpanRequest;
|
||||
|
||||
OnsConsumerTimeSpanRequest::OnsConsumerTimeSpanRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsConsumerTimeSpan")
|
||||
{}
|
||||
|
||||
OnsConsumerTimeSpanRequest::~OnsConsumerTimeSpanRequest()
|
||||
{}
|
||||
|
||||
long OnsConsumerTimeSpanRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsConsumerTimeSpanRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsConsumerTimeSpanRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsConsumerTimeSpanRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsConsumerTimeSpanRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsConsumerTimeSpanRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsConsumerTimeSpanRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsConsumerTimeSpanRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
68
ons/src/model/OnsConsumerTimeSpanResult.cc
Normal file
68
ons/src/model/OnsConsumerTimeSpanResult.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/ons/model/OnsConsumerTimeSpanResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsConsumerTimeSpanResult::OnsConsumerTimeSpanResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsConsumerTimeSpanResult::OnsConsumerTimeSpanResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsConsumerTimeSpanResult::~OnsConsumerTimeSpanResult()
|
||||
{}
|
||||
|
||||
void OnsConsumerTimeSpanResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Topic"].isNull())
|
||||
data_.topic = dataNode["Topic"].asString();
|
||||
if(!dataNode["MinTimeStamp"].isNull())
|
||||
data_.minTimeStamp = std::stol(dataNode["MinTimeStamp"].asString());
|
||||
if(!dataNode["MaxTimeStamp"].isNull())
|
||||
data_.maxTimeStamp = std::stol(dataNode["MaxTimeStamp"].asString());
|
||||
if(!dataNode["ConsumeTimeStamp"].isNull())
|
||||
data_.consumeTimeStamp = std::stol(dataNode["ConsumeTimeStamp"].asString());
|
||||
if(!dataNode["InstanceId"].isNull())
|
||||
data_.instanceId = dataNode["InstanceId"].asString();
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsConsumerTimeSpanResult::Data OnsConsumerTimeSpanResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsConsumerTimeSpanResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsDLQMessageGetByIdRequest.cc
Normal file
71
ons/src/model/OnsDLQMessageGetByIdRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsDLQMessageGetByIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsDLQMessageGetByIdRequest;
|
||||
|
||||
OnsDLQMessageGetByIdRequest::OnsDLQMessageGetByIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsDLQMessageGetById")
|
||||
{}
|
||||
|
||||
OnsDLQMessageGetByIdRequest::~OnsDLQMessageGetByIdRequest()
|
||||
{}
|
||||
|
||||
long OnsDLQMessageGetByIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageGetByIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageGetByIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageGetByIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageGetByIdRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageGetByIdRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageGetByIdRequest::getMsgId()const
|
||||
{
|
||||
return msgId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageGetByIdRequest::setMsgId(const std::string& msgId)
|
||||
{
|
||||
msgId_ = msgId;
|
||||
setParameter("MsgId", msgId);
|
||||
}
|
||||
|
||||
94
ons/src/model/OnsDLQMessageGetByIdResult.cc
Normal file
94
ons/src/model/OnsDLQMessageGetByIdResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/ons/model/OnsDLQMessageGetByIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsDLQMessageGetByIdResult::OnsDLQMessageGetByIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsDLQMessageGetByIdResult::OnsDLQMessageGetByIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsDLQMessageGetByIdResult::~OnsDLQMessageGetByIdResult()
|
||||
{}
|
||||
|
||||
void OnsDLQMessageGetByIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Topic"].isNull())
|
||||
data_.topic = dataNode["Topic"].asString();
|
||||
if(!dataNode["Flag"].isNull())
|
||||
data_.flag = std::stoi(dataNode["Flag"].asString());
|
||||
if(!dataNode["Body"].isNull())
|
||||
data_.body = dataNode["Body"].asString();
|
||||
if(!dataNode["StoreSize"].isNull())
|
||||
data_.storeSize = std::stoi(dataNode["StoreSize"].asString());
|
||||
if(!dataNode["BornTimestamp"].isNull())
|
||||
data_.bornTimestamp = std::stol(dataNode["BornTimestamp"].asString());
|
||||
if(!dataNode["BornHost"].isNull())
|
||||
data_.bornHost = dataNode["BornHost"].asString();
|
||||
if(!dataNode["StoreTimestamp"].isNull())
|
||||
data_.storeTimestamp = std::stol(dataNode["StoreTimestamp"].asString());
|
||||
if(!dataNode["StoreHost"].isNull())
|
||||
data_.storeHost = dataNode["StoreHost"].asString();
|
||||
if(!dataNode["MsgId"].isNull())
|
||||
data_.msgId = dataNode["MsgId"].asString();
|
||||
if(!dataNode["OffsetId"].isNull())
|
||||
data_.offsetId = dataNode["OffsetId"].asString();
|
||||
if(!dataNode["BodyCRC"].isNull())
|
||||
data_.bodyCRC = std::stoi(dataNode["BodyCRC"].asString());
|
||||
if(!dataNode["ReconsumeTimes"].isNull())
|
||||
data_.reconsumeTimes = std::stoi(dataNode["ReconsumeTimes"].asString());
|
||||
if(!dataNode["InstanceId"].isNull())
|
||||
data_.instanceId = dataNode["InstanceId"].asString();
|
||||
auto allPropertyList = value["PropertyList"]["MessageProperty"];
|
||||
for (auto value : allPropertyList)
|
||||
{
|
||||
Data::MessageProperty messagePropertyObject;
|
||||
if(!value["Name"].isNull())
|
||||
messagePropertyObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
messagePropertyObject.value = value["Value"].asString();
|
||||
data_.propertyList.push_back(messagePropertyObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsDLQMessageGetByIdResult::Data OnsDLQMessageGetByIdResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageGetByIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
115
ons/src/model/OnsDLQMessagePageQueryByGroupIdRequest.cc
Normal file
115
ons/src/model/OnsDLQMessagePageQueryByGroupIdRequest.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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/ons/model/OnsDLQMessagePageQueryByGroupIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsDLQMessagePageQueryByGroupIdRequest;
|
||||
|
||||
OnsDLQMessagePageQueryByGroupIdRequest::OnsDLQMessagePageQueryByGroupIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsDLQMessagePageQueryByGroupId")
|
||||
{}
|
||||
|
||||
OnsDLQMessagePageQueryByGroupIdRequest::~OnsDLQMessagePageQueryByGroupIdRequest()
|
||||
{}
|
||||
|
||||
long OnsDLQMessagePageQueryByGroupIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsDLQMessagePageQueryByGroupIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsDLQMessagePageQueryByGroupIdRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
int OnsDLQMessagePageQueryByGroupIdRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long OnsDLQMessagePageQueryByGroupIdRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsDLQMessagePageQueryByGroupIdRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
int OnsDLQMessagePageQueryByGroupIdRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string OnsDLQMessagePageQueryByGroupIdRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
106
ons/src/model/OnsDLQMessagePageQueryByGroupIdResult.cc
Normal file
106
ons/src/model/OnsDLQMessagePageQueryByGroupIdResult.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/ons/model/OnsDLQMessagePageQueryByGroupIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsDLQMessagePageQueryByGroupIdResult::OnsDLQMessagePageQueryByGroupIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsDLQMessagePageQueryByGroupIdResult::OnsDLQMessagePageQueryByGroupIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsDLQMessagePageQueryByGroupIdResult::~OnsDLQMessagePageQueryByGroupIdResult()
|
||||
{}
|
||||
|
||||
void OnsDLQMessagePageQueryByGroupIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto msgFoundDoNode = value["MsgFoundDo"];
|
||||
if(!msgFoundDoNode["TaskId"].isNull())
|
||||
msgFoundDo_.taskId = msgFoundDoNode["TaskId"].asString();
|
||||
if(!msgFoundDoNode["MaxPageCount"].isNull())
|
||||
msgFoundDo_.maxPageCount = std::stol(msgFoundDoNode["MaxPageCount"].asString());
|
||||
if(!msgFoundDoNode["CurrentPage"].isNull())
|
||||
msgFoundDo_.currentPage = std::stol(msgFoundDoNode["CurrentPage"].asString());
|
||||
auto allMsgFoundList = value["MsgFoundList"]["OnsRestMessageDo"];
|
||||
for (auto value : allMsgFoundList)
|
||||
{
|
||||
MsgFoundDo::OnsRestMessageDo onsRestMessageDoObject;
|
||||
if(!value["Topic"].isNull())
|
||||
onsRestMessageDoObject.topic = value["Topic"].asString();
|
||||
if(!value["Flag"].isNull())
|
||||
onsRestMessageDoObject.flag = std::stoi(value["Flag"].asString());
|
||||
if(!value["Body"].isNull())
|
||||
onsRestMessageDoObject.body = value["Body"].asString();
|
||||
if(!value["StoreSize"].isNull())
|
||||
onsRestMessageDoObject.storeSize = std::stoi(value["StoreSize"].asString());
|
||||
if(!value["BornTimestamp"].isNull())
|
||||
onsRestMessageDoObject.bornTimestamp = std::stol(value["BornTimestamp"].asString());
|
||||
if(!value["BornHost"].isNull())
|
||||
onsRestMessageDoObject.bornHost = value["BornHost"].asString();
|
||||
if(!value["StoreTimestamp"].isNull())
|
||||
onsRestMessageDoObject.storeTimestamp = std::stol(value["StoreTimestamp"].asString());
|
||||
if(!value["StoreHost"].isNull())
|
||||
onsRestMessageDoObject.storeHost = value["StoreHost"].asString();
|
||||
if(!value["MsgId"].isNull())
|
||||
onsRestMessageDoObject.msgId = value["MsgId"].asString();
|
||||
if(!value["OffsetId"].isNull())
|
||||
onsRestMessageDoObject.offsetId = value["OffsetId"].asString();
|
||||
if(!value["BodyCRC"].isNull())
|
||||
onsRestMessageDoObject.bodyCRC = std::stoi(value["BodyCRC"].asString());
|
||||
if(!value["ReconsumeTimes"].isNull())
|
||||
onsRestMessageDoObject.reconsumeTimes = std::stoi(value["ReconsumeTimes"].asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
onsRestMessageDoObject.instanceId = value["InstanceId"].asString();
|
||||
auto allPropertyList = value["PropertyList"]["MessageProperty"];
|
||||
for (auto value : allPropertyList)
|
||||
{
|
||||
MsgFoundDo::OnsRestMessageDo::MessageProperty propertyListObject;
|
||||
if(!value["Name"].isNull())
|
||||
propertyListObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
propertyListObject.value = value["Value"].asString();
|
||||
onsRestMessageDoObject.propertyList.push_back(propertyListObject);
|
||||
}
|
||||
msgFoundDo_.msgFoundList.push_back(onsRestMessageDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsDLQMessagePageQueryByGroupIdResult::MsgFoundDo OnsDLQMessagePageQueryByGroupIdResult::getMsgFoundDo()const
|
||||
{
|
||||
return msgFoundDo_;
|
||||
}
|
||||
|
||||
std::string OnsDLQMessagePageQueryByGroupIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsDLQMessageResendByIdRequest.cc
Normal file
71
ons/src/model/OnsDLQMessageResendByIdRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsDLQMessageResendByIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsDLQMessageResendByIdRequest;
|
||||
|
||||
OnsDLQMessageResendByIdRequest::OnsDLQMessageResendByIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsDLQMessageResendById")
|
||||
{}
|
||||
|
||||
OnsDLQMessageResendByIdRequest::~OnsDLQMessageResendByIdRequest()
|
||||
{}
|
||||
|
||||
long OnsDLQMessageResendByIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageResendByIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageResendByIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageResendByIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageResendByIdRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageResendByIdRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageResendByIdRequest::getMsgId()const
|
||||
{
|
||||
return msgId_;
|
||||
}
|
||||
|
||||
void OnsDLQMessageResendByIdRequest::setMsgId(const std::string& msgId)
|
||||
{
|
||||
msgId_ = msgId;
|
||||
setParameter("MsgId", msgId);
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsDLQMessageResendByIdResult.cc
Normal file
60
ons/src/model/OnsDLQMessageResendByIdResult.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsDLQMessageResendByIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsDLQMessageResendByIdResult::OnsDLQMessageResendByIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsDLQMessageResendByIdResult::OnsDLQMessageResendByIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsDLQMessageResendByIdResult::~OnsDLQMessageResendByIdResult()
|
||||
{}
|
||||
|
||||
void OnsDLQMessageResendByIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["MsgId"];
|
||||
for (const auto &item : allData)
|
||||
data_.push_back(item.asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> OnsDLQMessageResendByIdResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsDLQMessageResendByIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsGroupConsumerUpdateRequest.cc
Normal file
71
ons/src/model/OnsGroupConsumerUpdateRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupConsumerUpdateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsGroupConsumerUpdateRequest;
|
||||
|
||||
OnsGroupConsumerUpdateRequest::OnsGroupConsumerUpdateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsGroupConsumerUpdate")
|
||||
{}
|
||||
|
||||
OnsGroupConsumerUpdateRequest::~OnsGroupConsumerUpdateRequest()
|
||||
{}
|
||||
|
||||
long OnsGroupConsumerUpdateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsGroupConsumerUpdateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
bool OnsGroupConsumerUpdateRequest::getReadEnable()const
|
||||
{
|
||||
return readEnable_;
|
||||
}
|
||||
|
||||
void OnsGroupConsumerUpdateRequest::setReadEnable(bool readEnable)
|
||||
{
|
||||
readEnable_ = readEnable;
|
||||
setParameter("ReadEnable", readEnable ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string OnsGroupConsumerUpdateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsGroupConsumerUpdateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsGroupConsumerUpdateRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsGroupConsumerUpdateRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsGroupConsumerUpdateResult.cc
Normal file
52
ons/src/model/OnsGroupConsumerUpdateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupConsumerUpdateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsGroupConsumerUpdateResult::OnsGroupConsumerUpdateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsGroupConsumerUpdateResult::OnsGroupConsumerUpdateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsGroupConsumerUpdateResult::~OnsGroupConsumerUpdateResult()
|
||||
{}
|
||||
|
||||
void OnsGroupConsumerUpdateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsGroupConsumerUpdateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsGroupCreateRequest.cc
Normal file
71
ons/src/model/OnsGroupCreateRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupCreateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsGroupCreateRequest;
|
||||
|
||||
OnsGroupCreateRequest::OnsGroupCreateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsGroupCreate")
|
||||
{}
|
||||
|
||||
OnsGroupCreateRequest::~OnsGroupCreateRequest()
|
||||
{}
|
||||
|
||||
long OnsGroupCreateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsGroupCreateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsGroupCreateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsGroupCreateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsGroupCreateRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsGroupCreateRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsGroupCreateRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void OnsGroupCreateRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsGroupCreateResult.cc
Normal file
52
ons/src/model/OnsGroupCreateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupCreateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsGroupCreateResult::OnsGroupCreateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsGroupCreateResult::OnsGroupCreateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsGroupCreateResult::~OnsGroupCreateResult()
|
||||
{}
|
||||
|
||||
void OnsGroupCreateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsGroupCreateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsGroupDeleteRequest.cc
Normal file
60
ons/src/model/OnsGroupDeleteRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupDeleteRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsGroupDeleteRequest;
|
||||
|
||||
OnsGroupDeleteRequest::OnsGroupDeleteRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsGroupDelete")
|
||||
{}
|
||||
|
||||
OnsGroupDeleteRequest::~OnsGroupDeleteRequest()
|
||||
{}
|
||||
|
||||
long OnsGroupDeleteRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsGroupDeleteRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsGroupDeleteRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsGroupDeleteRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsGroupDeleteRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsGroupDeleteRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsGroupDeleteResult.cc
Normal file
52
ons/src/model/OnsGroupDeleteResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupDeleteResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsGroupDeleteResult::OnsGroupDeleteResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsGroupDeleteResult::OnsGroupDeleteResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsGroupDeleteResult::~OnsGroupDeleteResult()
|
||||
{}
|
||||
|
||||
void OnsGroupDeleteResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsGroupDeleteResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsGroupListRequest.cc
Normal file
60
ons/src/model/OnsGroupListRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupListRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsGroupListRequest;
|
||||
|
||||
OnsGroupListRequest::OnsGroupListRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsGroupList")
|
||||
{}
|
||||
|
||||
OnsGroupListRequest::~OnsGroupListRequest()
|
||||
{}
|
||||
|
||||
long OnsGroupListRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsGroupListRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsGroupListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsGroupListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsGroupListRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsGroupListRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
75
ons/src/model/OnsGroupListResult.cc
Normal file
75
ons/src/model/OnsGroupListResult.cc
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsGroupListResult::OnsGroupListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsGroupListResult::OnsGroupListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsGroupListResult::~OnsGroupListResult()
|
||||
{}
|
||||
|
||||
void OnsGroupListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["SubscribeInfoDo"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
SubscribeInfoDo dataObject;
|
||||
if(!value["Owner"].isNull())
|
||||
dataObject.owner = value["Owner"].asString();
|
||||
if(!value["GroupId"].isNull())
|
||||
dataObject.groupId = value["GroupId"].asString();
|
||||
if(!value["UpdateTime"].isNull())
|
||||
dataObject.updateTime = std::stol(value["UpdateTime"].asString());
|
||||
if(!value["Remark"].isNull())
|
||||
dataObject.remark = value["Remark"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
dataObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["IndependentNaming"].isNull())
|
||||
dataObject.independentNaming = value["IndependentNaming"].asString() == "true";
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsGroupListResult::SubscribeInfoDo> OnsGroupListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsGroupListResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsGroupSubDetailRequest.cc
Normal file
60
ons/src/model/OnsGroupSubDetailRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupSubDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsGroupSubDetailRequest;
|
||||
|
||||
OnsGroupSubDetailRequest::OnsGroupSubDetailRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsGroupSubDetail")
|
||||
{}
|
||||
|
||||
OnsGroupSubDetailRequest::~OnsGroupSubDetailRequest()
|
||||
{}
|
||||
|
||||
long OnsGroupSubDetailRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsGroupSubDetailRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsGroupSubDetailRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsGroupSubDetailRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsGroupSubDetailRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsGroupSubDetailRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
67
ons/src/model/OnsGroupSubDetailResult.cc
Normal file
67
ons/src/model/OnsGroupSubDetailResult.cc
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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/ons/model/OnsGroupSubDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsGroupSubDetailResult::OnsGroupSubDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsGroupSubDetailResult::OnsGroupSubDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsGroupSubDetailResult::~OnsGroupSubDetailResult()
|
||||
{}
|
||||
|
||||
void OnsGroupSubDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["GroupId"].isNull())
|
||||
data_.groupId = dataNode["GroupId"].asString();
|
||||
if(!dataNode["Online"].isNull())
|
||||
data_.online = dataNode["Online"].asString() == "true";
|
||||
if(!dataNode["MessageModel"].isNull())
|
||||
data_.messageModel = dataNode["MessageModel"].asString();
|
||||
auto allSubscriptionDataList = value["SubscriptionDataList"]["SubscriptionDataListItem"];
|
||||
for (auto value : allSubscriptionDataList)
|
||||
{
|
||||
Data::SubscriptionDataListItem subscriptionDataListItemObject;
|
||||
if(!value["Topic"].isNull())
|
||||
subscriptionDataListItemObject.topic = value["Topic"].asString();
|
||||
if(!value["SubString"].isNull())
|
||||
subscriptionDataListItemObject.subString = value["SubString"].asString();
|
||||
data_.subscriptionDataList.push_back(subscriptionDataListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
OnsGroupSubDetailResult::Data OnsGroupSubDetailResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
49
ons/src/model/OnsInstanceBaseInfoRequest.cc
Normal file
49
ons/src/model/OnsInstanceBaseInfoRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceBaseInfoRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsInstanceBaseInfoRequest;
|
||||
|
||||
OnsInstanceBaseInfoRequest::OnsInstanceBaseInfoRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsInstanceBaseInfo")
|
||||
{}
|
||||
|
||||
OnsInstanceBaseInfoRequest::~OnsInstanceBaseInfoRequest()
|
||||
{}
|
||||
|
||||
long OnsInstanceBaseInfoRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsInstanceBaseInfoRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsInstanceBaseInfoRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsInstanceBaseInfoRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
79
ons/src/model/OnsInstanceBaseInfoResult.cc
Normal file
79
ons/src/model/OnsInstanceBaseInfoResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceBaseInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsInstanceBaseInfoResult::OnsInstanceBaseInfoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsInstanceBaseInfoResult::OnsInstanceBaseInfoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsInstanceBaseInfoResult::~OnsInstanceBaseInfoResult()
|
||||
{}
|
||||
|
||||
void OnsInstanceBaseInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto instanceBaseInfoNode = value["InstanceBaseInfo"];
|
||||
if(!instanceBaseInfoNode["InstanceId"].isNull())
|
||||
instanceBaseInfo_.instanceId = instanceBaseInfoNode["InstanceId"].asString();
|
||||
if(!instanceBaseInfoNode["InstanceStatus"].isNull())
|
||||
instanceBaseInfo_.instanceStatus = std::stoi(instanceBaseInfoNode["InstanceStatus"].asString());
|
||||
if(!instanceBaseInfoNode["ReleaseTime"].isNull())
|
||||
instanceBaseInfo_.releaseTime = std::stol(instanceBaseInfoNode["ReleaseTime"].asString());
|
||||
if(!instanceBaseInfoNode["InstanceType"].isNull())
|
||||
instanceBaseInfo_.instanceType = std::stoi(instanceBaseInfoNode["InstanceType"].asString());
|
||||
if(!instanceBaseInfoNode["InstanceName"].isNull())
|
||||
instanceBaseInfo_.instanceName = instanceBaseInfoNode["InstanceName"].asString();
|
||||
if(!instanceBaseInfoNode["IndependentNaming"].isNull())
|
||||
instanceBaseInfo_.independentNaming = instanceBaseInfoNode["IndependentNaming"].asString() == "true";
|
||||
auto endpointsNode = instanceBaseInfoNode["Endpoints"];
|
||||
if(!endpointsNode["TcpEndpoint"].isNull())
|
||||
instanceBaseInfo_.endpoints.tcpEndpoint = endpointsNode["TcpEndpoint"].asString();
|
||||
if(!endpointsNode["HttpInternetEndpoint"].isNull())
|
||||
instanceBaseInfo_.endpoints.httpInternetEndpoint = endpointsNode["HttpInternetEndpoint"].asString();
|
||||
if(!endpointsNode["HttpInternetSecureEndpoint"].isNull())
|
||||
instanceBaseInfo_.endpoints.httpInternetSecureEndpoint = endpointsNode["HttpInternetSecureEndpoint"].asString();
|
||||
if(!endpointsNode["HttpInternalEndpoint"].isNull())
|
||||
instanceBaseInfo_.endpoints.httpInternalEndpoint = endpointsNode["HttpInternalEndpoint"].asString();
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsInstanceBaseInfoResult::InstanceBaseInfo OnsInstanceBaseInfoResult::getInstanceBaseInfo()const
|
||||
{
|
||||
return instanceBaseInfo_;
|
||||
}
|
||||
|
||||
std::string OnsInstanceBaseInfoResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsInstanceCreateRequest.cc
Normal file
60
ons/src/model/OnsInstanceCreateRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceCreateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsInstanceCreateRequest;
|
||||
|
||||
OnsInstanceCreateRequest::OnsInstanceCreateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsInstanceCreate")
|
||||
{}
|
||||
|
||||
OnsInstanceCreateRequest::~OnsInstanceCreateRequest()
|
||||
{}
|
||||
|
||||
long OnsInstanceCreateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsInstanceCreateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsInstanceCreateRequest::getInstanceName()const
|
||||
{
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void OnsInstanceCreateRequest::setInstanceName(const std::string& instanceName)
|
||||
{
|
||||
instanceName_ = instanceName;
|
||||
setParameter("InstanceName", instanceName);
|
||||
}
|
||||
|
||||
std::string OnsInstanceCreateRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void OnsInstanceCreateRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
62
ons/src/model/OnsInstanceCreateResult.cc
Normal file
62
ons/src/model/OnsInstanceCreateResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceCreateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsInstanceCreateResult::OnsInstanceCreateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsInstanceCreateResult::OnsInstanceCreateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsInstanceCreateResult::~OnsInstanceCreateResult()
|
||||
{}
|
||||
|
||||
void OnsInstanceCreateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["InstanceId"].isNull())
|
||||
data_.instanceId = dataNode["InstanceId"].asString();
|
||||
if(!dataNode["InstanceType"].isNull())
|
||||
data_.instanceType = std::stoi(dataNode["InstanceType"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsInstanceCreateResult::Data OnsInstanceCreateResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsInstanceCreateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
49
ons/src/model/OnsInstanceDeleteRequest.cc
Normal file
49
ons/src/model/OnsInstanceDeleteRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceDeleteRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsInstanceDeleteRequest;
|
||||
|
||||
OnsInstanceDeleteRequest::OnsInstanceDeleteRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsInstanceDelete")
|
||||
{}
|
||||
|
||||
OnsInstanceDeleteRequest::~OnsInstanceDeleteRequest()
|
||||
{}
|
||||
|
||||
long OnsInstanceDeleteRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsInstanceDeleteRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsInstanceDeleteRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsInstanceDeleteRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsInstanceDeleteResult.cc
Normal file
52
ons/src/model/OnsInstanceDeleteResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceDeleteResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsInstanceDeleteResult::OnsInstanceDeleteResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsInstanceDeleteResult::OnsInstanceDeleteResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsInstanceDeleteResult::~OnsInstanceDeleteResult()
|
||||
{}
|
||||
|
||||
void OnsInstanceDeleteResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsInstanceDeleteResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
38
ons/src/model/OnsInstanceInServiceListRequest.cc
Normal file
38
ons/src/model/OnsInstanceInServiceListRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceInServiceListRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsInstanceInServiceListRequest;
|
||||
|
||||
OnsInstanceInServiceListRequest::OnsInstanceInServiceListRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsInstanceInServiceList")
|
||||
{}
|
||||
|
||||
OnsInstanceInServiceListRequest::~OnsInstanceInServiceListRequest()
|
||||
{}
|
||||
|
||||
long OnsInstanceInServiceListRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsInstanceInServiceListRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
75
ons/src/model/OnsInstanceInServiceListResult.cc
Normal file
75
ons/src/model/OnsInstanceInServiceListResult.cc
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceInServiceListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsInstanceInServiceListResult::OnsInstanceInServiceListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsInstanceInServiceListResult::OnsInstanceInServiceListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsInstanceInServiceListResult::~OnsInstanceInServiceListResult()
|
||||
{}
|
||||
|
||||
void OnsInstanceInServiceListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["InstanceVO"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
InstanceVO dataObject;
|
||||
if(!value["InstanceId"].isNull())
|
||||
dataObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["InstanceStatus"].isNull())
|
||||
dataObject.instanceStatus = std::stoi(value["InstanceStatus"].asString());
|
||||
if(!value["ReleaseTime"].isNull())
|
||||
dataObject.releaseTime = std::stol(value["ReleaseTime"].asString());
|
||||
if(!value["InstanceType"].isNull())
|
||||
dataObject.instanceType = std::stoi(value["InstanceType"].asString());
|
||||
if(!value["InstanceName"].isNull())
|
||||
dataObject.instanceName = value["InstanceName"].asString();
|
||||
if(!value["IndependentNaming"].isNull())
|
||||
dataObject.independentNaming = value["IndependentNaming"].asString() == "true";
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsInstanceInServiceListResult::InstanceVO> OnsInstanceInServiceListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsInstanceInServiceListResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsInstanceUpdateRequest.cc
Normal file
71
ons/src/model/OnsInstanceUpdateRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceUpdateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsInstanceUpdateRequest;
|
||||
|
||||
OnsInstanceUpdateRequest::OnsInstanceUpdateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsInstanceUpdate")
|
||||
{}
|
||||
|
||||
OnsInstanceUpdateRequest::~OnsInstanceUpdateRequest()
|
||||
{}
|
||||
|
||||
long OnsInstanceUpdateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsInstanceUpdateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsInstanceUpdateRequest::getInstanceName()const
|
||||
{
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void OnsInstanceUpdateRequest::setInstanceName(const std::string& instanceName)
|
||||
{
|
||||
instanceName_ = instanceName;
|
||||
setParameter("InstanceName", instanceName);
|
||||
}
|
||||
|
||||
std::string OnsInstanceUpdateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsInstanceUpdateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsInstanceUpdateRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void OnsInstanceUpdateRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsInstanceUpdateResult.cc
Normal file
52
ons/src/model/OnsInstanceUpdateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsInstanceUpdateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsInstanceUpdateResult::OnsInstanceUpdateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsInstanceUpdateResult::OnsInstanceUpdateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsInstanceUpdateResult::~OnsInstanceUpdateResult()
|
||||
{}
|
||||
|
||||
void OnsInstanceUpdateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsInstanceUpdateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsMessageGetByKeyRequest.cc
Normal file
71
ons/src/model/OnsMessageGetByKeyRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageGetByKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMessageGetByKeyRequest;
|
||||
|
||||
OnsMessageGetByKeyRequest::OnsMessageGetByKeyRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMessageGetByKey")
|
||||
{}
|
||||
|
||||
OnsMessageGetByKeyRequest::~OnsMessageGetByKeyRequest()
|
||||
{}
|
||||
|
||||
long OnsMessageGetByKeyRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByKeyRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByKeyRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByKeyRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByKeyRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByKeyRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByKeyRequest::getKey()const
|
||||
{
|
||||
return key_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByKeyRequest::setKey(const std::string& key)
|
||||
{
|
||||
key_ = key;
|
||||
setParameter("Key", key);
|
||||
}
|
||||
|
||||
99
ons/src/model/OnsMessageGetByKeyResult.cc
Normal file
99
ons/src/model/OnsMessageGetByKeyResult.cc
Normal file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageGetByKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMessageGetByKeyResult::OnsMessageGetByKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMessageGetByKeyResult::OnsMessageGetByKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMessageGetByKeyResult::~OnsMessageGetByKeyResult()
|
||||
{}
|
||||
|
||||
void OnsMessageGetByKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["OnsRestMessageDo"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
OnsRestMessageDo dataObject;
|
||||
if(!value["Topic"].isNull())
|
||||
dataObject.topic = value["Topic"].asString();
|
||||
if(!value["Flag"].isNull())
|
||||
dataObject.flag = std::stoi(value["Flag"].asString());
|
||||
if(!value["Body"].isNull())
|
||||
dataObject.body = value["Body"].asString();
|
||||
if(!value["StoreSize"].isNull())
|
||||
dataObject.storeSize = std::stoi(value["StoreSize"].asString());
|
||||
if(!value["BornTimestamp"].isNull())
|
||||
dataObject.bornTimestamp = std::stol(value["BornTimestamp"].asString());
|
||||
if(!value["BornHost"].isNull())
|
||||
dataObject.bornHost = value["BornHost"].asString();
|
||||
if(!value["StoreTimestamp"].isNull())
|
||||
dataObject.storeTimestamp = std::stol(value["StoreTimestamp"].asString());
|
||||
if(!value["StoreHost"].isNull())
|
||||
dataObject.storeHost = value["StoreHost"].asString();
|
||||
if(!value["MsgId"].isNull())
|
||||
dataObject.msgId = value["MsgId"].asString();
|
||||
if(!value["OffsetId"].isNull())
|
||||
dataObject.offsetId = value["OffsetId"].asString();
|
||||
if(!value["BodyCRC"].isNull())
|
||||
dataObject.bodyCRC = std::stoi(value["BodyCRC"].asString());
|
||||
if(!value["ReconsumeTimes"].isNull())
|
||||
dataObject.reconsumeTimes = std::stoi(value["ReconsumeTimes"].asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
dataObject.instanceId = value["InstanceId"].asString();
|
||||
auto allPropertyList = value["PropertyList"]["MessageProperty"];
|
||||
for (auto value : allPropertyList)
|
||||
{
|
||||
OnsRestMessageDo::MessageProperty propertyListObject;
|
||||
if(!value["Name"].isNull())
|
||||
propertyListObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
propertyListObject.value = value["Value"].asString();
|
||||
dataObject.propertyList.push_back(propertyListObject);
|
||||
}
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsMessageGetByKeyResult::OnsRestMessageDo> OnsMessageGetByKeyResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByKeyResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsMessageGetByMsgIdRequest.cc
Normal file
71
ons/src/model/OnsMessageGetByMsgIdRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageGetByMsgIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMessageGetByMsgIdRequest;
|
||||
|
||||
OnsMessageGetByMsgIdRequest::OnsMessageGetByMsgIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMessageGetByMsgId")
|
||||
{}
|
||||
|
||||
OnsMessageGetByMsgIdRequest::~OnsMessageGetByMsgIdRequest()
|
||||
{}
|
||||
|
||||
long OnsMessageGetByMsgIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByMsgIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByMsgIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByMsgIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByMsgIdRequest::getMsgId()const
|
||||
{
|
||||
return msgId_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByMsgIdRequest::setMsgId(const std::string& msgId)
|
||||
{
|
||||
msgId_ = msgId;
|
||||
setParameter("MsgId", msgId);
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByMsgIdRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMessageGetByMsgIdRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
94
ons/src/model/OnsMessageGetByMsgIdResult.cc
Normal file
94
ons/src/model/OnsMessageGetByMsgIdResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageGetByMsgIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMessageGetByMsgIdResult::OnsMessageGetByMsgIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMessageGetByMsgIdResult::OnsMessageGetByMsgIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMessageGetByMsgIdResult::~OnsMessageGetByMsgIdResult()
|
||||
{}
|
||||
|
||||
void OnsMessageGetByMsgIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Topic"].isNull())
|
||||
data_.topic = dataNode["Topic"].asString();
|
||||
if(!dataNode["Flag"].isNull())
|
||||
data_.flag = std::stoi(dataNode["Flag"].asString());
|
||||
if(!dataNode["Body"].isNull())
|
||||
data_.body = dataNode["Body"].asString();
|
||||
if(!dataNode["StoreSize"].isNull())
|
||||
data_.storeSize = std::stoi(dataNode["StoreSize"].asString());
|
||||
if(!dataNode["BornTimestamp"].isNull())
|
||||
data_.bornTimestamp = std::stol(dataNode["BornTimestamp"].asString());
|
||||
if(!dataNode["BornHost"].isNull())
|
||||
data_.bornHost = dataNode["BornHost"].asString();
|
||||
if(!dataNode["StoreTimestamp"].isNull())
|
||||
data_.storeTimestamp = std::stol(dataNode["StoreTimestamp"].asString());
|
||||
if(!dataNode["StoreHost"].isNull())
|
||||
data_.storeHost = dataNode["StoreHost"].asString();
|
||||
if(!dataNode["MsgId"].isNull())
|
||||
data_.msgId = dataNode["MsgId"].asString();
|
||||
if(!dataNode["OffsetId"].isNull())
|
||||
data_.offsetId = dataNode["OffsetId"].asString();
|
||||
if(!dataNode["BodyCRC"].isNull())
|
||||
data_.bodyCRC = std::stoi(dataNode["BodyCRC"].asString());
|
||||
if(!dataNode["ReconsumeTimes"].isNull())
|
||||
data_.reconsumeTimes = std::stoi(dataNode["ReconsumeTimes"].asString());
|
||||
if(!dataNode["InstanceId"].isNull())
|
||||
data_.instanceId = dataNode["InstanceId"].asString();
|
||||
auto allPropertyList = value["PropertyList"]["MessageProperty"];
|
||||
for (auto value : allPropertyList)
|
||||
{
|
||||
Data::MessageProperty messagePropertyObject;
|
||||
if(!value["Name"].isNull())
|
||||
messagePropertyObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
messagePropertyObject.value = value["Value"].asString();
|
||||
data_.propertyList.push_back(messagePropertyObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMessageGetByMsgIdResult::Data OnsMessageGetByMsgIdResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMessageGetByMsgIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
115
ons/src/model/OnsMessagePageQueryByTopicRequest.cc
Normal file
115
ons/src/model/OnsMessagePageQueryByTopicRequest.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessagePageQueryByTopicRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMessagePageQueryByTopicRequest;
|
||||
|
||||
OnsMessagePageQueryByTopicRequest::OnsMessagePageQueryByTopicRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMessagePageQueryByTopic")
|
||||
{}
|
||||
|
||||
OnsMessagePageQueryByTopicRequest::~OnsMessagePageQueryByTopicRequest()
|
||||
{}
|
||||
|
||||
long OnsMessagePageQueryByTopicRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMessagePageQueryByTopicRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int OnsMessagePageQueryByTopicRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string OnsMessagePageQueryByTopicRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
long OnsMessagePageQueryByTopicRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsMessagePageQueryByTopicRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
int OnsMessagePageQueryByTopicRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string OnsMessagePageQueryByTopicRequest::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
void OnsMessagePageQueryByTopicRequest::setTaskId(const std::string& taskId)
|
||||
{
|
||||
taskId_ = taskId;
|
||||
setParameter("TaskId", taskId);
|
||||
}
|
||||
|
||||
106
ons/src/model/OnsMessagePageQueryByTopicResult.cc
Normal file
106
ons/src/model/OnsMessagePageQueryByTopicResult.cc
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessagePageQueryByTopicResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMessagePageQueryByTopicResult::OnsMessagePageQueryByTopicResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMessagePageQueryByTopicResult::OnsMessagePageQueryByTopicResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMessagePageQueryByTopicResult::~OnsMessagePageQueryByTopicResult()
|
||||
{}
|
||||
|
||||
void OnsMessagePageQueryByTopicResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto msgFoundDoNode = value["MsgFoundDo"];
|
||||
if(!msgFoundDoNode["TaskId"].isNull())
|
||||
msgFoundDo_.taskId = msgFoundDoNode["TaskId"].asString();
|
||||
if(!msgFoundDoNode["MaxPageCount"].isNull())
|
||||
msgFoundDo_.maxPageCount = std::stol(msgFoundDoNode["MaxPageCount"].asString());
|
||||
if(!msgFoundDoNode["CurrentPage"].isNull())
|
||||
msgFoundDo_.currentPage = std::stol(msgFoundDoNode["CurrentPage"].asString());
|
||||
auto allMsgFoundList = value["MsgFoundList"]["OnsRestMessageDo"];
|
||||
for (auto value : allMsgFoundList)
|
||||
{
|
||||
MsgFoundDo::OnsRestMessageDo onsRestMessageDoObject;
|
||||
if(!value["Topic"].isNull())
|
||||
onsRestMessageDoObject.topic = value["Topic"].asString();
|
||||
if(!value["Flag"].isNull())
|
||||
onsRestMessageDoObject.flag = std::stoi(value["Flag"].asString());
|
||||
if(!value["Body"].isNull())
|
||||
onsRestMessageDoObject.body = value["Body"].asString();
|
||||
if(!value["StoreSize"].isNull())
|
||||
onsRestMessageDoObject.storeSize = std::stoi(value["StoreSize"].asString());
|
||||
if(!value["BornTimestamp"].isNull())
|
||||
onsRestMessageDoObject.bornTimestamp = std::stol(value["BornTimestamp"].asString());
|
||||
if(!value["BornHost"].isNull())
|
||||
onsRestMessageDoObject.bornHost = value["BornHost"].asString();
|
||||
if(!value["StoreTimestamp"].isNull())
|
||||
onsRestMessageDoObject.storeTimestamp = std::stol(value["StoreTimestamp"].asString());
|
||||
if(!value["StoreHost"].isNull())
|
||||
onsRestMessageDoObject.storeHost = value["StoreHost"].asString();
|
||||
if(!value["MsgId"].isNull())
|
||||
onsRestMessageDoObject.msgId = value["MsgId"].asString();
|
||||
if(!value["OffsetId"].isNull())
|
||||
onsRestMessageDoObject.offsetId = value["OffsetId"].asString();
|
||||
if(!value["BodyCRC"].isNull())
|
||||
onsRestMessageDoObject.bodyCRC = std::stoi(value["BodyCRC"].asString());
|
||||
if(!value["ReconsumeTimes"].isNull())
|
||||
onsRestMessageDoObject.reconsumeTimes = std::stoi(value["ReconsumeTimes"].asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
onsRestMessageDoObject.instanceId = value["InstanceId"].asString();
|
||||
auto allPropertyList = value["PropertyList"]["MessageProperty"];
|
||||
for (auto value : allPropertyList)
|
||||
{
|
||||
MsgFoundDo::OnsRestMessageDo::MessageProperty propertyListObject;
|
||||
if(!value["Name"].isNull())
|
||||
propertyListObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
propertyListObject.value = value["Value"].asString();
|
||||
onsRestMessageDoObject.propertyList.push_back(propertyListObject);
|
||||
}
|
||||
msgFoundDo_.msgFoundList.push_back(onsRestMessageDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMessagePageQueryByTopicResult::MsgFoundDo OnsMessagePageQueryByTopicResult::getMsgFoundDo()const
|
||||
{
|
||||
return msgFoundDo_;
|
||||
}
|
||||
|
||||
std::string OnsMessagePageQueryByTopicResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
93
ons/src/model/OnsMessagePushRequest.cc
Normal file
93
ons/src/model/OnsMessagePushRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessagePushRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMessagePushRequest;
|
||||
|
||||
OnsMessagePushRequest::OnsMessagePushRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMessagePush")
|
||||
{}
|
||||
|
||||
OnsMessagePushRequest::~OnsMessagePushRequest()
|
||||
{}
|
||||
|
||||
long OnsMessagePushRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMessagePushRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMessagePushRequest::getClientId()const
|
||||
{
|
||||
return clientId_;
|
||||
}
|
||||
|
||||
void OnsMessagePushRequest::setClientId(const std::string& clientId)
|
||||
{
|
||||
clientId_ = clientId;
|
||||
setParameter("ClientId", clientId);
|
||||
}
|
||||
|
||||
std::string OnsMessagePushRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMessagePushRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMessagePushRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMessagePushRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsMessagePushRequest::getMsgId()const
|
||||
{
|
||||
return msgId_;
|
||||
}
|
||||
|
||||
void OnsMessagePushRequest::setMsgId(const std::string& msgId)
|
||||
{
|
||||
msgId_ = msgId;
|
||||
setParameter("MsgId", msgId);
|
||||
}
|
||||
|
||||
std::string OnsMessagePushRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMessagePushRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsMessagePushResult.cc
Normal file
52
ons/src/model/OnsMessagePushResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessagePushResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMessagePushResult::OnsMessagePushResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMessagePushResult::OnsMessagePushResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMessagePushResult::~OnsMessagePushResult()
|
||||
{}
|
||||
|
||||
void OnsMessagePushResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsMessagePushResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
93
ons/src/model/OnsMessageSendRequest.cc
Normal file
93
ons/src/model/OnsMessageSendRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageSendRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMessageSendRequest;
|
||||
|
||||
OnsMessageSendRequest::OnsMessageSendRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMessageSend")
|
||||
{}
|
||||
|
||||
OnsMessageSendRequest::~OnsMessageSendRequest()
|
||||
{}
|
||||
|
||||
long OnsMessageSendRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMessageSendRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMessageSendRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
std::string OnsMessageSendRequest::getTag()const
|
||||
{
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setTag(const std::string& tag)
|
||||
{
|
||||
tag_ = tag;
|
||||
setParameter("Tag", tag);
|
||||
}
|
||||
|
||||
std::string OnsMessageSendRequest::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setMessage(const std::string& message)
|
||||
{
|
||||
message_ = message;
|
||||
setParameter("Message", message);
|
||||
}
|
||||
|
||||
std::string OnsMessageSendRequest::getKey()const
|
||||
{
|
||||
return key_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setKey(const std::string& key)
|
||||
{
|
||||
key_ = key;
|
||||
setParameter("Key", key);
|
||||
}
|
||||
|
||||
59
ons/src/model/OnsMessageSendResult.cc
Normal file
59
ons/src/model/OnsMessageSendResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageSendResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMessageSendResult::OnsMessageSendResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMessageSendResult::OnsMessageSendResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMessageSendResult::~OnsMessageSendResult()
|
||||
{}
|
||||
|
||||
void OnsMessageSendResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsMessageSendResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMessageSendResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsMessageTraceRequest.cc
Normal file
71
ons/src/model/OnsMessageTraceRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageTraceRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMessageTraceRequest;
|
||||
|
||||
OnsMessageTraceRequest::OnsMessageTraceRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMessageTrace")
|
||||
{}
|
||||
|
||||
OnsMessageTraceRequest::~OnsMessageTraceRequest()
|
||||
{}
|
||||
|
||||
long OnsMessageTraceRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMessageTraceRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMessageTraceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMessageTraceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMessageTraceRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMessageTraceRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
std::string OnsMessageTraceRequest::getMsgId()const
|
||||
{
|
||||
return msgId_;
|
||||
}
|
||||
|
||||
void OnsMessageTraceRequest::setMsgId(const std::string& msgId)
|
||||
{
|
||||
msgId_ = msgId;
|
||||
setParameter("MsgId", msgId);
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsMessageTraceResult.cc
Normal file
71
ons/src/model/OnsMessageTraceResult.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMessageTraceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMessageTraceResult::OnsMessageTraceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMessageTraceResult::OnsMessageTraceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMessageTraceResult::~OnsMessageTraceResult()
|
||||
{}
|
||||
|
||||
void OnsMessageTraceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["MessageTrack"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
MessageTrack dataObject;
|
||||
if(!value["ConsumerGroup"].isNull())
|
||||
dataObject.consumerGroup = value["ConsumerGroup"].asString();
|
||||
if(!value["TrackType"].isNull())
|
||||
dataObject.trackType = value["TrackType"].asString();
|
||||
if(!value["ExceptionDesc"].isNull())
|
||||
dataObject.exceptionDesc = value["ExceptionDesc"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
dataObject.instanceId = value["InstanceId"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsMessageTraceResult::MessageTrack> OnsMessageTraceResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMessageTraceResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
82
ons/src/model/OnsMqttGroupIdCreateRequest.cc
Normal file
82
ons/src/model/OnsMqttGroupIdCreateRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttGroupIdCreateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttGroupIdCreateRequest;
|
||||
|
||||
OnsMqttGroupIdCreateRequest::OnsMqttGroupIdCreateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttGroupIdCreate")
|
||||
{}
|
||||
|
||||
OnsMqttGroupIdCreateRequest::~OnsMqttGroupIdCreateRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttGroupIdCreateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsMqttGroupIdCreateResult.cc
Normal file
52
ons/src/model/OnsMqttGroupIdCreateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttGroupIdCreateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttGroupIdCreateResult::OnsMqttGroupIdCreateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttGroupIdCreateResult::OnsMqttGroupIdCreateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttGroupIdCreateResult::~OnsMqttGroupIdCreateResult()
|
||||
{}
|
||||
|
||||
void OnsMqttGroupIdCreateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsMqttGroupIdDeleteRequest.cc
Normal file
71
ons/src/model/OnsMqttGroupIdDeleteRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttGroupIdDeleteRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttGroupIdDeleteRequest;
|
||||
|
||||
OnsMqttGroupIdDeleteRequest::OnsMqttGroupIdDeleteRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttGroupIdDelete")
|
||||
{}
|
||||
|
||||
OnsMqttGroupIdDeleteRequest::~OnsMqttGroupIdDeleteRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttGroupIdDeleteRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdDeleteRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdDeleteRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdDeleteRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdDeleteRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdDeleteRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdDeleteRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdDeleteRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsMqttGroupIdDeleteResult.cc
Normal file
52
ons/src/model/OnsMqttGroupIdDeleteResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttGroupIdDeleteResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttGroupIdDeleteResult::OnsMqttGroupIdDeleteResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttGroupIdDeleteResult::OnsMqttGroupIdDeleteResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttGroupIdDeleteResult::~OnsMqttGroupIdDeleteResult()
|
||||
{}
|
||||
|
||||
void OnsMqttGroupIdDeleteResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdDeleteResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
49
ons/src/model/OnsMqttGroupIdListRequest.cc
Normal file
49
ons/src/model/OnsMqttGroupIdListRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttGroupIdListRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttGroupIdListRequest;
|
||||
|
||||
OnsMqttGroupIdListRequest::OnsMqttGroupIdListRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttGroupIdList")
|
||||
{}
|
||||
|
||||
OnsMqttGroupIdListRequest::~OnsMqttGroupIdListRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttGroupIdListRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdListRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
83
ons/src/model/OnsMqttGroupIdListResult.cc
Normal file
83
ons/src/model/OnsMqttGroupIdListResult.cc
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttGroupIdListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttGroupIdListResult::OnsMqttGroupIdListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttGroupIdListResult::OnsMqttGroupIdListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttGroupIdListResult::~OnsMqttGroupIdListResult()
|
||||
{}
|
||||
|
||||
void OnsMqttGroupIdListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["MqttGroupIdDo"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
MqttGroupIdDo dataObject;
|
||||
if(!value["Id"].isNull())
|
||||
dataObject.id = std::stol(value["Id"].asString());
|
||||
if(!value["ChannelId"].isNull())
|
||||
dataObject.channelId = std::stoi(value["ChannelId"].asString());
|
||||
if(!value["Owner"].isNull())
|
||||
dataObject.owner = value["Owner"].asString();
|
||||
if(!value["GroupId"].isNull())
|
||||
dataObject.groupId = value["GroupId"].asString();
|
||||
if(!value["Topic"].isNull())
|
||||
dataObject.topic = value["Topic"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
dataObject.status = std::stoi(value["Status"].asString());
|
||||
if(!value["CreateTime"].isNull())
|
||||
dataObject.createTime = std::stol(value["CreateTime"].asString());
|
||||
if(!value["UpdateTime"].isNull())
|
||||
dataObject.updateTime = std::stol(value["UpdateTime"].asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
dataObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["IndependentNaming"].isNull())
|
||||
dataObject.independentNaming = value["IndependentNaming"].asString() == "true";
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsMqttGroupIdListResult::MqttGroupIdDo> OnsMqttGroupIdListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdListResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsMqttQueryClientByClientIdRequest.cc
Normal file
60
ons/src/model/OnsMqttQueryClientByClientIdRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryClientByClientIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttQueryClientByClientIdRequest;
|
||||
|
||||
OnsMqttQueryClientByClientIdRequest::OnsMqttQueryClientByClientIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttQueryClientByClientId")
|
||||
{}
|
||||
|
||||
OnsMqttQueryClientByClientIdRequest::~OnsMqttQueryClientByClientIdRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttQueryClientByClientIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByClientIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByClientIdRequest::getClientId()const
|
||||
{
|
||||
return clientId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByClientIdRequest::setClientId(const std::string& clientId)
|
||||
{
|
||||
clientId_ = clientId;
|
||||
setParameter("ClientId", clientId);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByClientIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByClientIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
78
ons/src/model/OnsMqttQueryClientByClientIdResult.cc
Normal file
78
ons/src/model/OnsMqttQueryClientByClientIdResult.cc
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryClientByClientIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttQueryClientByClientIdResult::OnsMqttQueryClientByClientIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttQueryClientByClientIdResult::OnsMqttQueryClientByClientIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByClientIdResult::~OnsMqttQueryClientByClientIdResult()
|
||||
{}
|
||||
|
||||
void OnsMqttQueryClientByClientIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto mqttClientInfoDoNode = value["MqttClientInfoDo"];
|
||||
if(!mqttClientInfoDoNode["Online"].isNull())
|
||||
mqttClientInfoDo_.online = mqttClientInfoDoNode["Online"].asString() == "true";
|
||||
if(!mqttClientInfoDoNode["ClientId"].isNull())
|
||||
mqttClientInfoDo_.clientId = mqttClientInfoDoNode["ClientId"].asString();
|
||||
if(!mqttClientInfoDoNode["SocketChannel"].isNull())
|
||||
mqttClientInfoDo_.socketChannel = mqttClientInfoDoNode["SocketChannel"].asString();
|
||||
if(!mqttClientInfoDoNode["LastTouch"].isNull())
|
||||
mqttClientInfoDo_.lastTouch = std::stol(mqttClientInfoDoNode["LastTouch"].asString());
|
||||
auto allSubScriptonData = value["SubScriptonData"]["SubscriptionDo"];
|
||||
for (auto value : allSubScriptonData)
|
||||
{
|
||||
MqttClientInfoDo::SubscriptionDo subscriptionDoObject;
|
||||
if(!value["ParentTopic"].isNull())
|
||||
subscriptionDoObject.parentTopic = value["ParentTopic"].asString();
|
||||
if(!value["SubTopic"].isNull())
|
||||
subscriptionDoObject.subTopic = value["SubTopic"].asString();
|
||||
if(!value["Qos"].isNull())
|
||||
subscriptionDoObject.qos = std::stoi(value["Qos"].asString());
|
||||
mqttClientInfoDo_.subScriptonData.push_back(subscriptionDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByClientIdResult::MqttClientInfoDo OnsMqttQueryClientByClientIdResult::getMqttClientInfoDo()const
|
||||
{
|
||||
return mqttClientInfoDo_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByClientIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsMqttQueryClientByGroupIdRequest.cc
Normal file
60
ons/src/model/OnsMqttQueryClientByGroupIdRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryClientByGroupIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttQueryClientByGroupIdRequest;
|
||||
|
||||
OnsMqttQueryClientByGroupIdRequest::OnsMqttQueryClientByGroupIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttQueryClientByGroupId")
|
||||
{}
|
||||
|
||||
OnsMqttQueryClientByGroupIdRequest::~OnsMqttQueryClientByGroupIdRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttQueryClientByGroupIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByGroupIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByGroupIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByGroupIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByGroupIdRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByGroupIdRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
62
ons/src/model/OnsMqttQueryClientByGroupIdResult.cc
Normal file
62
ons/src/model/OnsMqttQueryClientByGroupIdResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryClientByGroupIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttQueryClientByGroupIdResult::OnsMqttQueryClientByGroupIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttQueryClientByGroupIdResult::OnsMqttQueryClientByGroupIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByGroupIdResult::~OnsMqttQueryClientByGroupIdResult()
|
||||
{}
|
||||
|
||||
void OnsMqttQueryClientByGroupIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto mqttClientSetDoNode = value["MqttClientSetDo"];
|
||||
if(!mqttClientSetDoNode["OnlineCount"].isNull())
|
||||
mqttClientSetDo_.onlineCount = std::stol(mqttClientSetDoNode["OnlineCount"].asString());
|
||||
if(!mqttClientSetDoNode["PersistCount"].isNull())
|
||||
mqttClientSetDo_.persistCount = std::stol(mqttClientSetDoNode["PersistCount"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByGroupIdResult::MqttClientSetDo OnsMqttQueryClientByGroupIdResult::getMqttClientSetDo()const
|
||||
{
|
||||
return mqttClientSetDo_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByGroupIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsMqttQueryClientByTopicRequest.cc
Normal file
71
ons/src/model/OnsMqttQueryClientByTopicRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryClientByTopicRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttQueryClientByTopicRequest;
|
||||
|
||||
OnsMqttQueryClientByTopicRequest::OnsMqttQueryClientByTopicRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttQueryClientByTopic")
|
||||
{}
|
||||
|
||||
OnsMqttQueryClientByTopicRequest::~OnsMqttQueryClientByTopicRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttQueryClientByTopicRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicRequest::getParentTopic()const
|
||||
{
|
||||
return parentTopic_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setParentTopic(const std::string& parentTopic)
|
||||
{
|
||||
parentTopic_ = parentTopic;
|
||||
setParameter("ParentTopic", parentTopic);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicRequest::getSubTopic()const
|
||||
{
|
||||
return subTopic_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setSubTopic(const std::string& subTopic)
|
||||
{
|
||||
subTopic_ = subTopic;
|
||||
setParameter("SubTopic", subTopic);
|
||||
}
|
||||
|
||||
62
ons/src/model/OnsMqttQueryClientByTopicResult.cc
Normal file
62
ons/src/model/OnsMqttQueryClientByTopicResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryClientByTopicResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttQueryClientByTopicResult::OnsMqttQueryClientByTopicResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttQueryClientByTopicResult::OnsMqttQueryClientByTopicResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByTopicResult::~OnsMqttQueryClientByTopicResult()
|
||||
{}
|
||||
|
||||
void OnsMqttQueryClientByTopicResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto mqttClientSetDoNode = value["MqttClientSetDo"];
|
||||
if(!mqttClientSetDoNode["OnlineCount"].isNull())
|
||||
mqttClientSetDo_.onlineCount = std::stol(mqttClientSetDoNode["OnlineCount"].asString());
|
||||
if(!mqttClientSetDoNode["PersistCount"].isNull())
|
||||
mqttClientSetDo_.persistCount = std::stol(mqttClientSetDoNode["PersistCount"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByTopicResult::MqttClientSetDo OnsMqttQueryClientByTopicResult::getMqttClientSetDo()const
|
||||
{
|
||||
return mqttClientSetDo_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
82
ons/src/model/OnsMqttQueryHistoryOnlineRequest.cc
Normal file
82
ons/src/model/OnsMqttQueryHistoryOnlineRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryHistoryOnlineRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttQueryHistoryOnlineRequest;
|
||||
|
||||
OnsMqttQueryHistoryOnlineRequest::OnsMqttQueryHistoryOnlineRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttQueryHistoryOnline")
|
||||
{}
|
||||
|
||||
OnsMqttQueryHistoryOnlineRequest::~OnsMqttQueryHistoryOnlineRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttQueryHistoryOnlineRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryHistoryOnlineRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryHistoryOnlineRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
long OnsMqttQueryHistoryOnlineRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsMqttQueryHistoryOnlineRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
74
ons/src/model/OnsMqttQueryHistoryOnlineResult.cc
Normal file
74
ons/src/model/OnsMqttQueryHistoryOnlineResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryHistoryOnlineResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttQueryHistoryOnlineResult::OnsMqttQueryHistoryOnlineResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttQueryHistoryOnlineResult::OnsMqttQueryHistoryOnlineResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttQueryHistoryOnlineResult::~OnsMqttQueryHistoryOnlineResult()
|
||||
{}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Title"].isNull())
|
||||
data_.title = dataNode["Title"].asString();
|
||||
if(!dataNode["XUnit"].isNull())
|
||||
data_.xUnit = dataNode["XUnit"].asString();
|
||||
if(!dataNode["YUnit"].isNull())
|
||||
data_.yUnit = dataNode["YUnit"].asString();
|
||||
auto allRecords = value["Records"]["StatsDataDo"];
|
||||
for (auto value : allRecords)
|
||||
{
|
||||
Data::StatsDataDo statsDataDoObject;
|
||||
if(!value["X"].isNull())
|
||||
statsDataDoObject.x = std::stol(value["X"].asString());
|
||||
if(!value["Y"].isNull())
|
||||
statsDataDoObject.y = std::stof(value["Y"].asString());
|
||||
data_.records.push_back(statsDataDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryHistoryOnlineResult::Data OnsMqttQueryHistoryOnlineResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryHistoryOnlineResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
137
ons/src/model/OnsMqttQueryMsgTransTrendRequest.cc
Normal file
137
ons/src/model/OnsMqttQueryMsgTransTrendRequest.cc
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryMsgTransTrendRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsMqttQueryMsgTransTrendRequest;
|
||||
|
||||
OnsMqttQueryMsgTransTrendRequest::OnsMqttQueryMsgTransTrendRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsMqttQueryMsgTransTrend")
|
||||
{}
|
||||
|
||||
OnsMqttQueryMsgTransTrendRequest::~OnsMqttQueryMsgTransTrendRequest()
|
||||
{}
|
||||
|
||||
long OnsMqttQueryMsgTransTrendRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int OnsMqttQueryMsgTransTrendRequest::getQos()const
|
||||
{
|
||||
return qos_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setQos(int qos)
|
||||
{
|
||||
qos_ = qos;
|
||||
setParameter("Qos", std::to_string(qos));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendRequest::getTransType()const
|
||||
{
|
||||
return transType_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setTransType(const std::string& transType)
|
||||
{
|
||||
transType_ = transType;
|
||||
setParameter("TransType", transType);
|
||||
}
|
||||
|
||||
long OnsMqttQueryMsgTransTrendRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsMqttQueryMsgTransTrendRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendRequest::getTpsType()const
|
||||
{
|
||||
return tpsType_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setTpsType(const std::string& tpsType)
|
||||
{
|
||||
tpsType_ = tpsType;
|
||||
setParameter("TpsType", tpsType);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendRequest::getParentTopic()const
|
||||
{
|
||||
return parentTopic_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setParentTopic(const std::string& parentTopic)
|
||||
{
|
||||
parentTopic_ = parentTopic;
|
||||
setParameter("ParentTopic", parentTopic);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendRequest::getMsgType()const
|
||||
{
|
||||
return msgType_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setMsgType(const std::string& msgType)
|
||||
{
|
||||
msgType_ = msgType;
|
||||
setParameter("MsgType", msgType);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendRequest::getSubTopic()const
|
||||
{
|
||||
return subTopic_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendRequest::setSubTopic(const std::string& subTopic)
|
||||
{
|
||||
subTopic_ = subTopic;
|
||||
setParameter("SubTopic", subTopic);
|
||||
}
|
||||
|
||||
74
ons/src/model/OnsMqttQueryMsgTransTrendResult.cc
Normal file
74
ons/src/model/OnsMqttQueryMsgTransTrendResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/ons/model/OnsMqttQueryMsgTransTrendResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsMqttQueryMsgTransTrendResult::OnsMqttQueryMsgTransTrendResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsMqttQueryMsgTransTrendResult::OnsMqttQueryMsgTransTrendResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsMqttQueryMsgTransTrendResult::~OnsMqttQueryMsgTransTrendResult()
|
||||
{}
|
||||
|
||||
void OnsMqttQueryMsgTransTrendResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Title"].isNull())
|
||||
data_.title = dataNode["Title"].asString();
|
||||
if(!dataNode["XUnit"].isNull())
|
||||
data_.xUnit = dataNode["XUnit"].asString();
|
||||
if(!dataNode["YUnit"].isNull())
|
||||
data_.yUnit = dataNode["YUnit"].asString();
|
||||
auto allRecords = value["Records"]["StatsDataDo"];
|
||||
for (auto value : allRecords)
|
||||
{
|
||||
Data::StatsDataDo statsDataDoObject;
|
||||
if(!value["X"].isNull())
|
||||
statsDataDoObject.x = std::stol(value["X"].asString());
|
||||
if(!value["Y"].isNull())
|
||||
statsDataDoObject.y = std::stof(value["Y"].asString());
|
||||
data_.records.push_back(statsDataDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryMsgTransTrendResult::Data OnsMqttQueryMsgTransTrendResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryMsgTransTrendResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
38
ons/src/model/OnsRegionListRequest.cc
Normal file
38
ons/src/model/OnsRegionListRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/ons/model/OnsRegionListRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsRegionListRequest;
|
||||
|
||||
OnsRegionListRequest::OnsRegionListRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsRegionList")
|
||||
{}
|
||||
|
||||
OnsRegionListRequest::~OnsRegionListRequest()
|
||||
{}
|
||||
|
||||
long OnsRegionListRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsRegionListRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
77
ons/src/model/OnsRegionListResult.cc
Normal file
77
ons/src/model/OnsRegionListResult.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/ons/model/OnsRegionListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsRegionListResult::OnsRegionListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsRegionListResult::OnsRegionListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsRegionListResult::~OnsRegionListResult()
|
||||
{}
|
||||
|
||||
void OnsRegionListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["RegionDo"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
RegionDo dataObject;
|
||||
if(!value["Id"].isNull())
|
||||
dataObject.id = std::stol(value["Id"].asString());
|
||||
if(!value["OnsRegionId"].isNull())
|
||||
dataObject.onsRegionId = value["OnsRegionId"].asString();
|
||||
if(!value["RegionName"].isNull())
|
||||
dataObject.regionName = value["RegionName"].asString();
|
||||
if(!value["ChannelId"].isNull())
|
||||
dataObject.channelId = std::stoi(value["ChannelId"].asString());
|
||||
if(!value["ChannelName"].isNull())
|
||||
dataObject.channelName = value["ChannelName"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
dataObject.createTime = std::stol(value["CreateTime"].asString());
|
||||
if(!value["UpdateTime"].isNull())
|
||||
dataObject.updateTime = std::stol(value["UpdateTime"].asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsRegionListResult::RegionDo> OnsRegionListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsRegionListResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
82
ons/src/model/OnsTopicCreateRequest.cc
Normal file
82
ons/src/model/OnsTopicCreateRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicCreateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTopicCreateRequest;
|
||||
|
||||
OnsTopicCreateRequest::OnsTopicCreateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTopicCreate")
|
||||
{}
|
||||
|
||||
OnsTopicCreateRequest::~OnsTopicCreateRequest()
|
||||
{}
|
||||
|
||||
long OnsTopicCreateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTopicCreateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTopicCreateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTopicCreateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int OnsTopicCreateRequest::getMessageType()const
|
||||
{
|
||||
return messageType_;
|
||||
}
|
||||
|
||||
void OnsTopicCreateRequest::setMessageType(int messageType)
|
||||
{
|
||||
messageType_ = messageType;
|
||||
setParameter("MessageType", std::to_string(messageType));
|
||||
}
|
||||
|
||||
std::string OnsTopicCreateRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTopicCreateRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
std::string OnsTopicCreateRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void OnsTopicCreateRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsTopicCreateResult.cc
Normal file
52
ons/src/model/OnsTopicCreateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicCreateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTopicCreateResult::OnsTopicCreateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTopicCreateResult::OnsTopicCreateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTopicCreateResult::~OnsTopicCreateResult()
|
||||
{}
|
||||
|
||||
void OnsTopicCreateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsTopicCreateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsTopicDeleteRequest.cc
Normal file
60
ons/src/model/OnsTopicDeleteRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicDeleteRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTopicDeleteRequest;
|
||||
|
||||
OnsTopicDeleteRequest::OnsTopicDeleteRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTopicDelete")
|
||||
{}
|
||||
|
||||
OnsTopicDeleteRequest::~OnsTopicDeleteRequest()
|
||||
{}
|
||||
|
||||
long OnsTopicDeleteRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTopicDeleteRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTopicDeleteRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTopicDeleteRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTopicDeleteRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTopicDeleteRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsTopicDeleteResult.cc
Normal file
52
ons/src/model/OnsTopicDeleteResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicDeleteResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTopicDeleteResult::OnsTopicDeleteResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTopicDeleteResult::OnsTopicDeleteResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTopicDeleteResult::~OnsTopicDeleteResult()
|
||||
{}
|
||||
|
||||
void OnsTopicDeleteResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsTopicDeleteResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsTopicListRequest.cc
Normal file
60
ons/src/model/OnsTopicListRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicListRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTopicListRequest;
|
||||
|
||||
OnsTopicListRequest::OnsTopicListRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTopicList")
|
||||
{}
|
||||
|
||||
OnsTopicListRequest::~OnsTopicListRequest()
|
||||
{}
|
||||
|
||||
long OnsTopicListRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTopicListRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTopicListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTopicListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTopicListRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTopicListRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
81
ons/src/model/OnsTopicListResult.cc
Normal file
81
ons/src/model/OnsTopicListResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTopicListResult::OnsTopicListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTopicListResult::OnsTopicListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTopicListResult::~OnsTopicListResult()
|
||||
{}
|
||||
|
||||
void OnsTopicListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["PublishInfoDo"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
PublishInfoDo dataObject;
|
||||
if(!value["Topic"].isNull())
|
||||
dataObject.topic = value["Topic"].asString();
|
||||
if(!value["Owner"].isNull())
|
||||
dataObject.owner = value["Owner"].asString();
|
||||
if(!value["Relation"].isNull())
|
||||
dataObject.relation = std::stoi(value["Relation"].asString());
|
||||
if(!value["RelationName"].isNull())
|
||||
dataObject.relationName = value["RelationName"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
dataObject.createTime = std::stol(value["CreateTime"].asString());
|
||||
if(!value["Remark"].isNull())
|
||||
dataObject.remark = value["Remark"].asString();
|
||||
if(!value["MessageType"].isNull())
|
||||
dataObject.messageType = std::stoi(value["MessageType"].asString());
|
||||
if(!value["InstanceId"].isNull())
|
||||
dataObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["IndependentNaming"].isNull())
|
||||
dataObject.independentNaming = value["IndependentNaming"].asString() == "true";
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<OnsTopicListResult::PublishInfoDo> OnsTopicListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsTopicListResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsTopicStatusRequest.cc
Normal file
60
ons/src/model/OnsTopicStatusRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTopicStatusRequest;
|
||||
|
||||
OnsTopicStatusRequest::OnsTopicStatusRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTopicStatus")
|
||||
{}
|
||||
|
||||
OnsTopicStatusRequest::~OnsTopicStatusRequest()
|
||||
{}
|
||||
|
||||
long OnsTopicStatusRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTopicStatusRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTopicStatusRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTopicStatusRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTopicStatusRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTopicStatusRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
64
ons/src/model/OnsTopicStatusResult.cc
Normal file
64
ons/src/model/OnsTopicStatusResult.cc
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTopicStatusResult::OnsTopicStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTopicStatusResult::OnsTopicStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTopicStatusResult::~OnsTopicStatusResult()
|
||||
{}
|
||||
|
||||
void OnsTopicStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["TotalCount"].isNull())
|
||||
data_.totalCount = std::stol(dataNode["TotalCount"].asString());
|
||||
if(!dataNode["LastTimeStamp"].isNull())
|
||||
data_.lastTimeStamp = std::stol(dataNode["LastTimeStamp"].asString());
|
||||
if(!dataNode["Perm"].isNull())
|
||||
data_.perm = std::stoi(dataNode["Perm"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsTopicStatusResult::Data OnsTopicStatusResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsTopicStatusResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
60
ons/src/model/OnsTopicSubDetailRequest.cc
Normal file
60
ons/src/model/OnsTopicSubDetailRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicSubDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTopicSubDetailRequest;
|
||||
|
||||
OnsTopicSubDetailRequest::OnsTopicSubDetailRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTopicSubDetail")
|
||||
{}
|
||||
|
||||
OnsTopicSubDetailRequest::~OnsTopicSubDetailRequest()
|
||||
{}
|
||||
|
||||
long OnsTopicSubDetailRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTopicSubDetailRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTopicSubDetailRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTopicSubDetailRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTopicSubDetailRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTopicSubDetailRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
65
ons/src/model/OnsTopicSubDetailResult.cc
Normal file
65
ons/src/model/OnsTopicSubDetailResult.cc
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicSubDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTopicSubDetailResult::OnsTopicSubDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTopicSubDetailResult::OnsTopicSubDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTopicSubDetailResult::~OnsTopicSubDetailResult()
|
||||
{}
|
||||
|
||||
void OnsTopicSubDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Topic"].isNull())
|
||||
data_.topic = dataNode["Topic"].asString();
|
||||
auto allSubscriptionDataList = value["SubscriptionDataList"]["SubscriptionDataListItem"];
|
||||
for (auto value : allSubscriptionDataList)
|
||||
{
|
||||
Data::SubscriptionDataListItem subscriptionDataListItemObject;
|
||||
if(!value["GroupId"].isNull())
|
||||
subscriptionDataListItemObject.groupId = value["GroupId"].asString();
|
||||
if(!value["SubString"].isNull())
|
||||
subscriptionDataListItemObject.subString = value["SubString"].asString();
|
||||
if(!value["MessageModel"].isNull())
|
||||
subscriptionDataListItemObject.messageModel = value["MessageModel"].asString();
|
||||
data_.subscriptionDataList.push_back(subscriptionDataListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
OnsTopicSubDetailResult::Data OnsTopicSubDetailResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsTopicUpdateRequest.cc
Normal file
71
ons/src/model/OnsTopicUpdateRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicUpdateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTopicUpdateRequest;
|
||||
|
||||
OnsTopicUpdateRequest::OnsTopicUpdateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTopicUpdate")
|
||||
{}
|
||||
|
||||
OnsTopicUpdateRequest::~OnsTopicUpdateRequest()
|
||||
{}
|
||||
|
||||
long OnsTopicUpdateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTopicUpdateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTopicUpdateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTopicUpdateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int OnsTopicUpdateRequest::getPerm()const
|
||||
{
|
||||
return perm_;
|
||||
}
|
||||
|
||||
void OnsTopicUpdateRequest::setPerm(int perm)
|
||||
{
|
||||
perm_ = perm;
|
||||
setParameter("Perm", std::to_string(perm));
|
||||
}
|
||||
|
||||
std::string OnsTopicUpdateRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTopicUpdateRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsTopicUpdateResult.cc
Normal file
52
ons/src/model/OnsTopicUpdateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTopicUpdateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTopicUpdateResult::OnsTopicUpdateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTopicUpdateResult::OnsTopicUpdateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTopicUpdateResult::~OnsTopicUpdateResult()
|
||||
{}
|
||||
|
||||
void OnsTopicUpdateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsTopicUpdateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
49
ons/src/model/OnsTraceGetResultRequest.cc
Normal file
49
ons/src/model/OnsTraceGetResultRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTraceGetResultRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTraceGetResultRequest;
|
||||
|
||||
OnsTraceGetResultRequest::OnsTraceGetResultRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTraceGetResult")
|
||||
{}
|
||||
|
||||
OnsTraceGetResultRequest::~OnsTraceGetResultRequest()
|
||||
{}
|
||||
|
||||
long OnsTraceGetResultRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTraceGetResultRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTraceGetResultRequest::getQueryId()const
|
||||
{
|
||||
return queryId_;
|
||||
}
|
||||
|
||||
void OnsTraceGetResultRequest::setQueryId(const std::string& queryId)
|
||||
{
|
||||
queryId_ = queryId;
|
||||
setParameter("QueryId", queryId);
|
||||
}
|
||||
|
||||
130
ons/src/model/OnsTraceGetResultResult.cc
Normal file
130
ons/src/model/OnsTraceGetResultResult.cc
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTraceGetResultResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTraceGetResultResult::OnsTraceGetResultResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTraceGetResultResult::OnsTraceGetResultResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTraceGetResultResult::~OnsTraceGetResultResult()
|
||||
{}
|
||||
|
||||
void OnsTraceGetResultResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto traceDataNode = value["TraceData"];
|
||||
if(!traceDataNode["QueryId"].isNull())
|
||||
traceData_.queryId = traceDataNode["QueryId"].asString();
|
||||
if(!traceDataNode["UserId"].isNull())
|
||||
traceData_.userId = traceDataNode["UserId"].asString();
|
||||
if(!traceDataNode["Topic"].isNull())
|
||||
traceData_.topic = traceDataNode["Topic"].asString();
|
||||
if(!traceDataNode["MsgId"].isNull())
|
||||
traceData_.msgId = traceDataNode["MsgId"].asString();
|
||||
if(!traceDataNode["MsgKey"].isNull())
|
||||
traceData_.msgKey = traceDataNode["MsgKey"].asString();
|
||||
if(!traceDataNode["Status"].isNull())
|
||||
traceData_.status = traceDataNode["Status"].asString();
|
||||
if(!traceDataNode["CreateTime"].isNull())
|
||||
traceData_.createTime = std::stol(traceDataNode["CreateTime"].asString());
|
||||
if(!traceDataNode["UpdateTime"].isNull())
|
||||
traceData_.updateTime = std::stol(traceDataNode["UpdateTime"].asString());
|
||||
if(!traceDataNode["InstanceId"].isNull())
|
||||
traceData_.instanceId = traceDataNode["InstanceId"].asString();
|
||||
auto allTraceList = value["TraceList"]["TraceMapDo"];
|
||||
for (auto value : allTraceList)
|
||||
{
|
||||
TraceData::TraceMapDo traceMapDoObject;
|
||||
if(!value["PubTime"].isNull())
|
||||
traceMapDoObject.pubTime = std::stol(value["PubTime"].asString());
|
||||
if(!value["Topic"].isNull())
|
||||
traceMapDoObject.topic = value["Topic"].asString();
|
||||
if(!value["PubGroupName"].isNull())
|
||||
traceMapDoObject.pubGroupName = value["PubGroupName"].asString();
|
||||
if(!value["MsgId"].isNull())
|
||||
traceMapDoObject.msgId = value["MsgId"].asString();
|
||||
if(!value["Tag"].isNull())
|
||||
traceMapDoObject.tag = value["Tag"].asString();
|
||||
if(!value["MsgKey"].isNull())
|
||||
traceMapDoObject.msgKey = value["MsgKey"].asString();
|
||||
if(!value["BornHost"].isNull())
|
||||
traceMapDoObject.bornHost = value["BornHost"].asString();
|
||||
if(!value["CostTime"].isNull())
|
||||
traceMapDoObject.costTime = std::stoi(value["CostTime"].asString());
|
||||
if(!value["Status"].isNull())
|
||||
traceMapDoObject.status = value["Status"].asString();
|
||||
auto allSubList = value["SubList"]["SubMapDo"];
|
||||
for (auto value : allSubList)
|
||||
{
|
||||
TraceData::TraceMapDo::SubMapDo subListObject;
|
||||
if(!value["SubGroupName"].isNull())
|
||||
subListObject.subGroupName = value["SubGroupName"].asString();
|
||||
if(!value["SuccessCount"].isNull())
|
||||
subListObject.successCount = std::stoi(value["SuccessCount"].asString());
|
||||
if(!value["FailCount"].isNull())
|
||||
subListObject.failCount = std::stoi(value["FailCount"].asString());
|
||||
auto allClientList = value["ClientList"]["SubClientInfoDo"];
|
||||
for (auto value : allClientList)
|
||||
{
|
||||
TraceData::TraceMapDo::SubMapDo::SubClientInfoDo clientListObject;
|
||||
if(!value["SubGroupName"].isNull())
|
||||
clientListObject.subGroupName = value["SubGroupName"].asString();
|
||||
if(!value["SubTime"].isNull())
|
||||
clientListObject.subTime = std::stol(value["SubTime"].asString());
|
||||
if(!value["ClientHost"].isNull())
|
||||
clientListObject.clientHost = value["ClientHost"].asString();
|
||||
if(!value["ReconsumeTimes"].isNull())
|
||||
clientListObject.reconsumeTimes = std::stoi(value["ReconsumeTimes"].asString());
|
||||
if(!value["CostTime"].isNull())
|
||||
clientListObject.costTime = std::stoi(value["CostTime"].asString());
|
||||
if(!value["Status"].isNull())
|
||||
clientListObject.status = value["Status"].asString();
|
||||
subListObject.clientList.push_back(clientListObject);
|
||||
}
|
||||
traceMapDoObject.subList.push_back(subListObject);
|
||||
}
|
||||
traceData_.traceList.push_back(traceMapDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsTraceGetResultResult::TraceData OnsTraceGetResultResult::getTraceData()const
|
||||
{
|
||||
return traceData_;
|
||||
}
|
||||
|
||||
std::string OnsTraceGetResultResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
93
ons/src/model/OnsTraceQueryByMsgIdRequest.cc
Normal file
93
ons/src/model/OnsTraceQueryByMsgIdRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTraceQueryByMsgIdRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTraceQueryByMsgIdRequest;
|
||||
|
||||
OnsTraceQueryByMsgIdRequest::OnsTraceQueryByMsgIdRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTraceQueryByMsgId")
|
||||
{}
|
||||
|
||||
OnsTraceQueryByMsgIdRequest::~OnsTraceQueryByMsgIdRequest()
|
||||
{}
|
||||
|
||||
long OnsTraceQueryByMsgIdRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgIdRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgIdRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgIdRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgIdRequest::getMsgId()const
|
||||
{
|
||||
return msgId_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgIdRequest::setMsgId(const std::string& msgId)
|
||||
{
|
||||
msgId_ = msgId;
|
||||
setParameter("MsgId", msgId);
|
||||
}
|
||||
|
||||
long OnsTraceQueryByMsgIdRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgIdRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsTraceQueryByMsgIdRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgIdRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
59
ons/src/model/OnsTraceQueryByMsgIdResult.cc
Normal file
59
ons/src/model/OnsTraceQueryByMsgIdResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTraceQueryByMsgIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTraceQueryByMsgIdResult::OnsTraceQueryByMsgIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTraceQueryByMsgIdResult::OnsTraceQueryByMsgIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTraceQueryByMsgIdResult::~OnsTraceQueryByMsgIdResult()
|
||||
{}
|
||||
|
||||
void OnsTraceQueryByMsgIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
if(!value["QueryId"].isNull())
|
||||
queryId_ = value["QueryId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgIdResult::getQueryId()const
|
||||
{
|
||||
return queryId_;
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
93
ons/src/model/OnsTraceQueryByMsgKeyRequest.cc
Normal file
93
ons/src/model/OnsTraceQueryByMsgKeyRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTraceQueryByMsgKeyRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTraceQueryByMsgKeyRequest;
|
||||
|
||||
OnsTraceQueryByMsgKeyRequest::OnsTraceQueryByMsgKeyRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTraceQueryByMsgKey")
|
||||
{}
|
||||
|
||||
OnsTraceQueryByMsgKeyRequest::~OnsTraceQueryByMsgKeyRequest()
|
||||
{}
|
||||
|
||||
long OnsTraceQueryByMsgKeyRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgKeyRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgKeyRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgKeyRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgKeyRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgKeyRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
long OnsTraceQueryByMsgKeyRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgKeyRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsTraceQueryByMsgKeyRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgKeyRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgKeyRequest::getMsgKey()const
|
||||
{
|
||||
return msgKey_;
|
||||
}
|
||||
|
||||
void OnsTraceQueryByMsgKeyRequest::setMsgKey(const std::string& msgKey)
|
||||
{
|
||||
msgKey_ = msgKey;
|
||||
setParameter("MsgKey", msgKey);
|
||||
}
|
||||
|
||||
59
ons/src/model/OnsTraceQueryByMsgKeyResult.cc
Normal file
59
ons/src/model/OnsTraceQueryByMsgKeyResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTraceQueryByMsgKeyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTraceQueryByMsgKeyResult::OnsTraceQueryByMsgKeyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTraceQueryByMsgKeyResult::OnsTraceQueryByMsgKeyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTraceQueryByMsgKeyResult::~OnsTraceQueryByMsgKeyResult()
|
||||
{}
|
||||
|
||||
void OnsTraceQueryByMsgKeyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
if(!value["QueryId"].isNull())
|
||||
queryId_ = value["QueryId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgKeyResult::getQueryId()const
|
||||
{
|
||||
return queryId_;
|
||||
}
|
||||
|
||||
std::string OnsTraceQueryByMsgKeyResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
115
ons/src/model/OnsTrendGroupOutputTpsRequest.cc
Normal file
115
ons/src/model/OnsTrendGroupOutputTpsRequest.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTrendGroupOutputTpsRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTrendGroupOutputTpsRequest;
|
||||
|
||||
OnsTrendGroupOutputTpsRequest::OnsTrendGroupOutputTpsRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTrendGroupOutputTps")
|
||||
{}
|
||||
|
||||
OnsTrendGroupOutputTpsRequest::~OnsTrendGroupOutputTpsRequest()
|
||||
{}
|
||||
|
||||
long OnsTrendGroupOutputTpsRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
long OnsTrendGroupOutputTpsRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setPeriod(long period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
std::string OnsTrendGroupOutputTpsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTrendGroupOutputTpsRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsTrendGroupOutputTpsRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
long OnsTrendGroupOutputTpsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsTrendGroupOutputTpsRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
int OnsTrendGroupOutputTpsRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void OnsTrendGroupOutputTpsRequest::setType(int type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", std::to_string(type));
|
||||
}
|
||||
|
||||
74
ons/src/model/OnsTrendGroupOutputTpsResult.cc
Normal file
74
ons/src/model/OnsTrendGroupOutputTpsResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTrendGroupOutputTpsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTrendGroupOutputTpsResult::OnsTrendGroupOutputTpsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTrendGroupOutputTpsResult::OnsTrendGroupOutputTpsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTrendGroupOutputTpsResult::~OnsTrendGroupOutputTpsResult()
|
||||
{}
|
||||
|
||||
void OnsTrendGroupOutputTpsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Title"].isNull())
|
||||
data_.title = dataNode["Title"].asString();
|
||||
if(!dataNode["XUnit"].isNull())
|
||||
data_.xUnit = dataNode["XUnit"].asString();
|
||||
if(!dataNode["YUnit"].isNull())
|
||||
data_.yUnit = dataNode["YUnit"].asString();
|
||||
auto allRecords = value["Records"]["StatsDataDo"];
|
||||
for (auto value : allRecords)
|
||||
{
|
||||
Data::StatsDataDo statsDataDoObject;
|
||||
if(!value["X"].isNull())
|
||||
statsDataDoObject.x = std::stol(value["X"].asString());
|
||||
if(!value["Y"].isNull())
|
||||
statsDataDoObject.y = std::stof(value["Y"].asString());
|
||||
data_.records.push_back(statsDataDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsTrendGroupOutputTpsResult::Data OnsTrendGroupOutputTpsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsTrendGroupOutputTpsResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
104
ons/src/model/OnsTrendTopicInputTpsRequest.cc
Normal file
104
ons/src/model/OnsTrendTopicInputTpsRequest.cc
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTrendTopicInputTpsRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsTrendTopicInputTpsRequest;
|
||||
|
||||
OnsTrendTopicInputTpsRequest::OnsTrendTopicInputTpsRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsTrendTopicInputTps")
|
||||
{}
|
||||
|
||||
OnsTrendTopicInputTpsRequest::~OnsTrendTopicInputTpsRequest()
|
||||
{}
|
||||
|
||||
long OnsTrendTopicInputTpsRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
long OnsTrendTopicInputTpsRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setPeriod(long period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
std::string OnsTrendTopicInputTpsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsTrendTopicInputTpsRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
long OnsTrendTopicInputTpsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setEndTime(long endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", std::to_string(endTime));
|
||||
}
|
||||
|
||||
long OnsTrendTopicInputTpsRequest::getBeginTime()const
|
||||
{
|
||||
return beginTime_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setBeginTime(long beginTime)
|
||||
{
|
||||
beginTime_ = beginTime;
|
||||
setParameter("BeginTime", std::to_string(beginTime));
|
||||
}
|
||||
|
||||
int OnsTrendTopicInputTpsRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void OnsTrendTopicInputTpsRequest::setType(int type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", std::to_string(type));
|
||||
}
|
||||
|
||||
74
ons/src/model/OnsTrendTopicInputTpsResult.cc
Normal file
74
ons/src/model/OnsTrendTopicInputTpsResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/ons/model/OnsTrendTopicInputTpsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsTrendTopicInputTpsResult::OnsTrendTopicInputTpsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsTrendTopicInputTpsResult::OnsTrendTopicInputTpsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsTrendTopicInputTpsResult::~OnsTrendTopicInputTpsResult()
|
||||
{}
|
||||
|
||||
void OnsTrendTopicInputTpsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Title"].isNull())
|
||||
data_.title = dataNode["Title"].asString();
|
||||
if(!dataNode["XUnit"].isNull())
|
||||
data_.xUnit = dataNode["XUnit"].asString();
|
||||
if(!dataNode["YUnit"].isNull())
|
||||
data_.yUnit = dataNode["YUnit"].asString();
|
||||
auto allRecords = value["Records"]["StatsDataDo"];
|
||||
for (auto value : allRecords)
|
||||
{
|
||||
Data::StatsDataDo statsDataDoObject;
|
||||
if(!value["X"].isNull())
|
||||
statsDataDoObject.x = std::stol(value["X"].asString());
|
||||
if(!value["Y"].isNull())
|
||||
statsDataDoObject.y = std::stof(value["Y"].asString());
|
||||
data_.records.push_back(statsDataDoObject);
|
||||
}
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsTrendTopicInputTpsResult::Data OnsTrendTopicInputTpsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsTrendTopicInputTpsResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
137
ons/src/model/OnsWarnCreateRequest.cc
Normal file
137
ons/src/model/OnsWarnCreateRequest.cc
Normal file
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* 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/ons/model/OnsWarnCreateRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsWarnCreateRequest;
|
||||
|
||||
OnsWarnCreateRequest::OnsWarnCreateRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsWarnCreate")
|
||||
{}
|
||||
|
||||
OnsWarnCreateRequest::~OnsWarnCreateRequest()
|
||||
{}
|
||||
|
||||
long OnsWarnCreateRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getBlockTime()const
|
||||
{
|
||||
return blockTime_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setBlockTime(const std::string& blockTime)
|
||||
{
|
||||
blockTime_ = blockTime;
|
||||
setParameter("BlockTime", blockTime);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getDelayTime()const
|
||||
{
|
||||
return delayTime_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setDelayTime(const std::string& delayTime)
|
||||
{
|
||||
delayTime_ = delayTime;
|
||||
setParameter("DelayTime", delayTime);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getThreshold()const
|
||||
{
|
||||
return threshold_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setThreshold(const std::string& threshold)
|
||||
{
|
||||
threshold_ = threshold;
|
||||
setParameter("Threshold", threshold);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getAlertTime()const
|
||||
{
|
||||
return alertTime_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setAlertTime(const std::string& alertTime)
|
||||
{
|
||||
alertTime_ = alertTime;
|
||||
setParameter("AlertTime", alertTime);
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateRequest::getContacts()const
|
||||
{
|
||||
return contacts_;
|
||||
}
|
||||
|
||||
void OnsWarnCreateRequest::setContacts(const std::string& contacts)
|
||||
{
|
||||
contacts_ = contacts;
|
||||
setParameter("Contacts", contacts);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsWarnCreateResult.cc
Normal file
52
ons/src/model/OnsWarnCreateResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsWarnCreateResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsWarnCreateResult::OnsWarnCreateResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsWarnCreateResult::OnsWarnCreateResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsWarnCreateResult::~OnsWarnCreateResult()
|
||||
{}
|
||||
|
||||
void OnsWarnCreateResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsWarnCreateResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
71
ons/src/model/OnsWarnDeleteRequest.cc
Normal file
71
ons/src/model/OnsWarnDeleteRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/ons/model/OnsWarnDeleteRequest.h>
|
||||
|
||||
using AlibabaCloud::Ons::Model::OnsWarnDeleteRequest;
|
||||
|
||||
OnsWarnDeleteRequest::OnsWarnDeleteRequest() :
|
||||
RpcServiceRequest("ons", "2019-02-14", "OnsWarnDelete")
|
||||
{}
|
||||
|
||||
OnsWarnDeleteRequest::~OnsWarnDeleteRequest()
|
||||
{}
|
||||
|
||||
long OnsWarnDeleteRequest::getPreventCache()const
|
||||
{
|
||||
return preventCache_;
|
||||
}
|
||||
|
||||
void OnsWarnDeleteRequest::setPreventCache(long preventCache)
|
||||
{
|
||||
preventCache_ = preventCache;
|
||||
setParameter("PreventCache", std::to_string(preventCache));
|
||||
}
|
||||
|
||||
std::string OnsWarnDeleteRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsWarnDeleteRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsWarnDeleteRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsWarnDeleteRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsWarnDeleteRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsWarnDeleteRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
52
ons/src/model/OnsWarnDeleteResult.cc
Normal file
52
ons/src/model/OnsWarnDeleteResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/ons/model/OnsWarnDeleteResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ons;
|
||||
using namespace AlibabaCloud::Ons::Model;
|
||||
|
||||
OnsWarnDeleteResult::OnsWarnDeleteResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
OnsWarnDeleteResult::OnsWarnDeleteResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
OnsWarnDeleteResult::~OnsWarnDeleteResult()
|
||||
{}
|
||||
|
||||
void OnsWarnDeleteResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsWarnDeleteResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user