Adjusted the call frequency limit of some APIs.

This commit is contained in:
sdk-team
2022-02-17 02:23:12 +00:00
parent 08961b2ff9
commit b1e2b491e9
43 changed files with 7 additions and 2654 deletions

View File

@@ -879,42 +879,6 @@ OnsClient::OnsMessagePushOutcomeCallable OnsClient::onsMessagePushCallable(const
return task->get_future();
}
OnsClient::OnsMessageSendOutcome OnsClient::onsMessageSend(const OnsMessageSendRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMessageSendOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMessageSendOutcome(OnsMessageSendResult(outcome.result()));
else
return OnsMessageSendOutcome(outcome.error());
}
void OnsClient::onsMessageSendAsync(const OnsMessageSendRequest& request, const OnsMessageSendAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMessageSend(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMessageSendOutcomeCallable OnsClient::onsMessageSendCallable(const OnsMessageSendRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMessageSendOutcome()>>(
[this, request]()
{
return this->onsMessageSend(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMessageTraceOutcome OnsClient::onsMessageTrace(const OnsMessageTraceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -951,294 +915,6 @@ OnsClient::OnsMessageTraceOutcomeCallable OnsClient::onsMessageTraceCallable(con
return task->get_future();
}
OnsClient::OnsMqttGroupIdCreateOutcome OnsClient::onsMqttGroupIdCreate(const OnsMqttGroupIdCreateRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttGroupIdCreateOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttGroupIdCreateOutcome(OnsMqttGroupIdCreateResult(outcome.result()));
else
return OnsMqttGroupIdCreateOutcome(outcome.error());
}
void OnsClient::onsMqttGroupIdCreateAsync(const OnsMqttGroupIdCreateRequest& request, const OnsMqttGroupIdCreateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttGroupIdCreate(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttGroupIdCreateOutcomeCallable OnsClient::onsMqttGroupIdCreateCallable(const OnsMqttGroupIdCreateRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttGroupIdCreateOutcome()>>(
[this, request]()
{
return this->onsMqttGroupIdCreate(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttGroupIdDeleteOutcome OnsClient::onsMqttGroupIdDelete(const OnsMqttGroupIdDeleteRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttGroupIdDeleteOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttGroupIdDeleteOutcome(OnsMqttGroupIdDeleteResult(outcome.result()));
else
return OnsMqttGroupIdDeleteOutcome(outcome.error());
}
void OnsClient::onsMqttGroupIdDeleteAsync(const OnsMqttGroupIdDeleteRequest& request, const OnsMqttGroupIdDeleteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttGroupIdDelete(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttGroupIdDeleteOutcomeCallable OnsClient::onsMqttGroupIdDeleteCallable(const OnsMqttGroupIdDeleteRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttGroupIdDeleteOutcome()>>(
[this, request]()
{
return this->onsMqttGroupIdDelete(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttGroupIdListOutcome OnsClient::onsMqttGroupIdList(const OnsMqttGroupIdListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttGroupIdListOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttGroupIdListOutcome(OnsMqttGroupIdListResult(outcome.result()));
else
return OnsMqttGroupIdListOutcome(outcome.error());
}
void OnsClient::onsMqttGroupIdListAsync(const OnsMqttGroupIdListRequest& request, const OnsMqttGroupIdListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttGroupIdList(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttGroupIdListOutcomeCallable OnsClient::onsMqttGroupIdListCallable(const OnsMqttGroupIdListRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttGroupIdListOutcome()>>(
[this, request]()
{
return this->onsMqttGroupIdList(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttQueryClientByClientIdOutcome OnsClient::onsMqttQueryClientByClientId(const OnsMqttQueryClientByClientIdRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttQueryClientByClientIdOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttQueryClientByClientIdOutcome(OnsMqttQueryClientByClientIdResult(outcome.result()));
else
return OnsMqttQueryClientByClientIdOutcome(outcome.error());
}
void OnsClient::onsMqttQueryClientByClientIdAsync(const OnsMqttQueryClientByClientIdRequest& request, const OnsMqttQueryClientByClientIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttQueryClientByClientId(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttQueryClientByClientIdOutcomeCallable OnsClient::onsMqttQueryClientByClientIdCallable(const OnsMqttQueryClientByClientIdRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttQueryClientByClientIdOutcome()>>(
[this, request]()
{
return this->onsMqttQueryClientByClientId(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttQueryClientByGroupIdOutcome OnsClient::onsMqttQueryClientByGroupId(const OnsMqttQueryClientByGroupIdRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttQueryClientByGroupIdOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttQueryClientByGroupIdOutcome(OnsMqttQueryClientByGroupIdResult(outcome.result()));
else
return OnsMqttQueryClientByGroupIdOutcome(outcome.error());
}
void OnsClient::onsMqttQueryClientByGroupIdAsync(const OnsMqttQueryClientByGroupIdRequest& request, const OnsMqttQueryClientByGroupIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttQueryClientByGroupId(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttQueryClientByGroupIdOutcomeCallable OnsClient::onsMqttQueryClientByGroupIdCallable(const OnsMqttQueryClientByGroupIdRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttQueryClientByGroupIdOutcome()>>(
[this, request]()
{
return this->onsMqttQueryClientByGroupId(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttQueryClientByTopicOutcome OnsClient::onsMqttQueryClientByTopic(const OnsMqttQueryClientByTopicRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttQueryClientByTopicOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttQueryClientByTopicOutcome(OnsMqttQueryClientByTopicResult(outcome.result()));
else
return OnsMqttQueryClientByTopicOutcome(outcome.error());
}
void OnsClient::onsMqttQueryClientByTopicAsync(const OnsMqttQueryClientByTopicRequest& request, const OnsMqttQueryClientByTopicAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttQueryClientByTopic(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttQueryClientByTopicOutcomeCallable OnsClient::onsMqttQueryClientByTopicCallable(const OnsMqttQueryClientByTopicRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttQueryClientByTopicOutcome()>>(
[this, request]()
{
return this->onsMqttQueryClientByTopic(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttQueryHistoryOnlineOutcome OnsClient::onsMqttQueryHistoryOnline(const OnsMqttQueryHistoryOnlineRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttQueryHistoryOnlineOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttQueryHistoryOnlineOutcome(OnsMqttQueryHistoryOnlineResult(outcome.result()));
else
return OnsMqttQueryHistoryOnlineOutcome(outcome.error());
}
void OnsClient::onsMqttQueryHistoryOnlineAsync(const OnsMqttQueryHistoryOnlineRequest& request, const OnsMqttQueryHistoryOnlineAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttQueryHistoryOnline(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttQueryHistoryOnlineOutcomeCallable OnsClient::onsMqttQueryHistoryOnlineCallable(const OnsMqttQueryHistoryOnlineRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttQueryHistoryOnlineOutcome()>>(
[this, request]()
{
return this->onsMqttQueryHistoryOnline(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsMqttQueryMsgTransTrendOutcome OnsClient::onsMqttQueryMsgTransTrend(const OnsMqttQueryMsgTransTrendRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return OnsMqttQueryMsgTransTrendOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return OnsMqttQueryMsgTransTrendOutcome(OnsMqttQueryMsgTransTrendResult(outcome.result()));
else
return OnsMqttQueryMsgTransTrendOutcome(outcome.error());
}
void OnsClient::onsMqttQueryMsgTransTrendAsync(const OnsMqttQueryMsgTransTrendRequest& request, const OnsMqttQueryMsgTransTrendAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, onsMqttQueryMsgTransTrend(request), context);
};
asyncExecute(new Runnable(fn));
}
OnsClient::OnsMqttQueryMsgTransTrendOutcomeCallable OnsClient::onsMqttQueryMsgTransTrendCallable(const OnsMqttQueryMsgTransTrendRequest &request) const
{
auto task = std::make_shared<std::packaged_task<OnsMqttQueryMsgTransTrendOutcome()>>(
[this, request]()
{
return this->onsMqttQueryMsgTransTrend(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OnsClient::OnsRegionListOutcome OnsClient::onsRegionList(const OnsRegionListRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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);
}

View File

@@ -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_;
}

View File

@@ -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)
{