Adjusted the call frequency limit of some APIs.
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMessageSendRequest::~OnsMessageSendRequest()
|
||||
{}
|
||||
|
||||
std::string OnsMessageSendRequest::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setMessage(const std::string& message)
|
||||
{
|
||||
message_ = message;
|
||||
setParameter("Message", message);
|
||||
}
|
||||
|
||||
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::getKey()const
|
||||
{
|
||||
return key_;
|
||||
}
|
||||
|
||||
void OnsMessageSendRequest::setKey(const std::string& key)
|
||||
{
|
||||
key_ = key;
|
||||
setParameter("Key", key);
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* 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["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string OnsMessageSendResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string OnsMessageSendResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttGroupIdCreateRequest::~OnsMqttGroupIdCreateRequest()
|
||||
{}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdCreateRequest::getTopic()const
|
||||
{
|
||||
return topic_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdCreateRequest::setTopic(const std::string& topic)
|
||||
{
|
||||
topic_ = topic;
|
||||
setParameter("Topic", topic);
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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_;
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttGroupIdDeleteRequest::~OnsMqttGroupIdDeleteRequest()
|
||||
{}
|
||||
|
||||
std::string OnsMqttGroupIdDeleteRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdDeleteRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsMqttGroupIdDeleteRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdDeleteRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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_;
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttGroupIdListRequest::~OnsMqttGroupIdListRequest()
|
||||
{}
|
||||
|
||||
std::string OnsMqttGroupIdListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttGroupIdListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* 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 allDataNode = value["Data"]["MqttGroupIdDo"];
|
||||
for (auto valueDataMqttGroupIdDo : allDataNode)
|
||||
{
|
||||
MqttGroupIdDo dataObject;
|
||||
if(!valueDataMqttGroupIdDo["Status"].isNull())
|
||||
dataObject.status = std::stoi(valueDataMqttGroupIdDo["Status"].asString());
|
||||
if(!valueDataMqttGroupIdDo["UpdateTime"].isNull())
|
||||
dataObject.updateTime = std::stol(valueDataMqttGroupIdDo["UpdateTime"].asString());
|
||||
if(!valueDataMqttGroupIdDo["Owner"].isNull())
|
||||
dataObject.owner = valueDataMqttGroupIdDo["Owner"].asString();
|
||||
if(!valueDataMqttGroupIdDo["IndependentNaming"].isNull())
|
||||
dataObject.independentNaming = valueDataMqttGroupIdDo["IndependentNaming"].asString() == "true";
|
||||
if(!valueDataMqttGroupIdDo["GroupId"].isNull())
|
||||
dataObject.groupId = valueDataMqttGroupIdDo["GroupId"].asString();
|
||||
if(!valueDataMqttGroupIdDo["CreateTime"].isNull())
|
||||
dataObject.createTime = std::stol(valueDataMqttGroupIdDo["CreateTime"].asString());
|
||||
if(!valueDataMqttGroupIdDo["Topic"].isNull())
|
||||
dataObject.topic = valueDataMqttGroupIdDo["Topic"].asString();
|
||||
if(!valueDataMqttGroupIdDo["ChannelId"].isNull())
|
||||
dataObject.channelId = std::stoi(valueDataMqttGroupIdDo["ChannelId"].asString());
|
||||
if(!valueDataMqttGroupIdDo["InstanceId"].isNull())
|
||||
dataObject.instanceId = valueDataMqttGroupIdDo["InstanceId"].asString();
|
||||
if(!valueDataMqttGroupIdDo["Id"].isNull())
|
||||
dataObject.id = std::stol(valueDataMqttGroupIdDo["Id"].asString());
|
||||
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_;
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByClientIdRequest::~OnsMqttQueryClientByClientIdRequest()
|
||||
{}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* 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["LastTouch"].isNull())
|
||||
mqttClientInfoDo_.lastTouch = std::stol(mqttClientInfoDoNode["LastTouch"].asString());
|
||||
if(!mqttClientInfoDoNode["SocketChannel"].isNull())
|
||||
mqttClientInfoDo_.socketChannel = mqttClientInfoDoNode["SocketChannel"].asString();
|
||||
if(!mqttClientInfoDoNode["ClientId"].isNull())
|
||||
mqttClientInfoDo_.clientId = mqttClientInfoDoNode["ClientId"].asString();
|
||||
auto allSubScriptonDataNode = mqttClientInfoDoNode["SubScriptonData"]["SubscriptionDo"];
|
||||
for (auto mqttClientInfoDoNodeSubScriptonDataSubscriptionDo : allSubScriptonDataNode)
|
||||
{
|
||||
MqttClientInfoDo::SubscriptionDo subscriptionDoObject;
|
||||
if(!mqttClientInfoDoNodeSubScriptonDataSubscriptionDo["SubTopic"].isNull())
|
||||
subscriptionDoObject.subTopic = mqttClientInfoDoNodeSubScriptonDataSubscriptionDo["SubTopic"].asString();
|
||||
if(!mqttClientInfoDoNodeSubScriptonDataSubscriptionDo["ParentTopic"].isNull())
|
||||
subscriptionDoObject.parentTopic = mqttClientInfoDoNodeSubScriptonDataSubscriptionDo["ParentTopic"].asString();
|
||||
if(!mqttClientInfoDoNodeSubScriptonDataSubscriptionDo["Qos"].isNull())
|
||||
subscriptionDoObject.qos = std::stoi(mqttClientInfoDoNodeSubScriptonDataSubscriptionDo["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_;
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByGroupIdRequest::~OnsMqttQueryClientByGroupIdRequest()
|
||||
{}
|
||||
|
||||
std::string OnsMqttQueryClientByGroupIdRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByGroupIdRequest::setGroupId(const std::string& groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByGroupIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByGroupIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* 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["PersistCount"].isNull())
|
||||
mqttClientSetDo_.persistCount = std::stol(mqttClientSetDoNode["PersistCount"].asString());
|
||||
if(!mqttClientSetDoNode["OnlineCount"].isNull())
|
||||
mqttClientSetDo_.onlineCount = std::stol(mqttClientSetDoNode["OnlineCount"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByGroupIdResult::MqttClientSetDo OnsMqttQueryClientByGroupIdResult::getMqttClientSetDo()const
|
||||
{
|
||||
return mqttClientSetDo_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByGroupIdResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByTopicRequest::~OnsMqttQueryClientByTopicRequest()
|
||||
{}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicRequest::getParentTopic()const
|
||||
{
|
||||
return parentTopic_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setParentTopic(const std::string& parentTopic)
|
||||
{
|
||||
parentTopic_ = parentTopic;
|
||||
setParameter("ParentTopic", parentTopic);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicRequest::getSubTopic()const
|
||||
{
|
||||
return subTopic_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryClientByTopicRequest::setSubTopic(const std::string& subTopic)
|
||||
{
|
||||
subTopic_ = subTopic;
|
||||
setParameter("SubTopic", subTopic);
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* 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["PersistCount"].isNull())
|
||||
mqttClientSetDo_.persistCount = std::stol(mqttClientSetDoNode["PersistCount"].asString());
|
||||
if(!mqttClientSetDoNode["OnlineCount"].isNull())
|
||||
mqttClientSetDo_.onlineCount = std::stol(mqttClientSetDoNode["OnlineCount"].asString());
|
||||
if(!value["HelpUrl"].isNull())
|
||||
helpUrl_ = value["HelpUrl"].asString();
|
||||
|
||||
}
|
||||
|
||||
OnsMqttQueryClientByTopicResult::MqttClientSetDo OnsMqttQueryClientByTopicResult::getMqttClientSetDo()const
|
||||
{
|
||||
return mqttClientSetDo_;
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryClientByTopicResult::getHelpUrl()const
|
||||
{
|
||||
return helpUrl_;
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttQueryHistoryOnlineRequest::~OnsMqttQueryHistoryOnlineRequest()
|
||||
{}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
std::string OnsMqttQueryHistoryOnlineRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void OnsMqttQueryHistoryOnlineRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* 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["XUnit"].isNull())
|
||||
data_.xUnit = dataNode["XUnit"].asString();
|
||||
if(!dataNode["YUnit"].isNull())
|
||||
data_.yUnit = dataNode["YUnit"].asString();
|
||||
if(!dataNode["Title"].isNull())
|
||||
data_.title = dataNode["Title"].asString();
|
||||
auto allRecordsNode = dataNode["Records"]["StatsDataDo"];
|
||||
for (auto dataNodeRecordsStatsDataDo : allRecordsNode)
|
||||
{
|
||||
Data::StatsDataDo statsDataDoObject;
|
||||
if(!dataNodeRecordsStatsDataDo["Y"].isNull())
|
||||
statsDataDoObject.y = std::stof(dataNodeRecordsStatsDataDo["Y"].asString());
|
||||
if(!dataNodeRecordsStatsDataDo["X"].isNull())
|
||||
statsDataDoObject.x = std::stol(dataNodeRecordsStatsDataDo["X"].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_;
|
||||
}
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
* 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")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
OnsMqttQueryMsgTransTrendRequest::~OnsMqttQueryMsgTransTrendRequest()
|
||||
{}
|
||||
|
||||
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::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::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);
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* 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["XUnit"].isNull())
|
||||
data_.xUnit = dataNode["XUnit"].asString();
|
||||
if(!dataNode["YUnit"].isNull())
|
||||
data_.yUnit = dataNode["YUnit"].asString();
|
||||
if(!dataNode["Title"].isNull())
|
||||
data_.title = dataNode["Title"].asString();
|
||||
auto allRecordsNode = dataNode["Records"]["StatsDataDo"];
|
||||
for (auto dataNodeRecordsStatsDataDo : allRecordsNode)
|
||||
{
|
||||
Data::StatsDataDo statsDataDoObject;
|
||||
if(!dataNodeRecordsStatsDataDo["Y"].isNull())
|
||||
statsDataDoObject.y = std::stof(dataNodeRecordsStatsDataDo["Y"].asString());
|
||||
if(!dataNodeRecordsStatsDataDo["X"].isNull())
|
||||
statsDataDoObject.x = std::stol(dataNodeRecordsStatsDataDo["X"].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_;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ void OnsTopicListResult::parse(const std::string &payload)
|
||||
dataObject.topic = valueDataPublishInfoDo["Topic"].asString();
|
||||
if(!valueDataPublishInfoDo["InstanceId"].isNull())
|
||||
dataObject.instanceId = valueDataPublishInfoDo["InstanceId"].asString();
|
||||
if(!valueDataPublishInfoDo["ServiceStatus"].isNull())
|
||||
dataObject.serviceStatus = std::stoi(valueDataPublishInfoDo["ServiceStatus"].asString());
|
||||
auto allTagsNode = valueDataPublishInfoDo["Tags"]["Tag"];
|
||||
for (auto valueDataPublishInfoDoTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user