Generated 2018-01-20 for Iot.

This commit is contained in:
sdk-team
2021-05-08 06:02:16 +00:00
parent f063a7bdba
commit e14cc7c0eb
97 changed files with 5566 additions and 50 deletions

View File

@@ -31,21 +31,21 @@ IotClient::IotClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "iot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IotClient::IotClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "iot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IotClient::IotClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "iot");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
IotClient::~IotClient()
@@ -1347,6 +1347,42 @@ IotClient::CancelOTATaskByJobOutcomeCallable IotClient::cancelOTATaskByJobCallab
return task->get_future();
}
IotClient::CancelReleaseProductOutcome IotClient::cancelReleaseProduct(const CancelReleaseProductRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CancelReleaseProductOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CancelReleaseProductOutcome(CancelReleaseProductResult(outcome.result()));
else
return CancelReleaseProductOutcome(outcome.error());
}
void IotClient::cancelReleaseProductAsync(const CancelReleaseProductRequest& request, const CancelReleaseProductAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, cancelReleaseProduct(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::CancelReleaseProductOutcomeCallable IotClient::cancelReleaseProductCallable(const CancelReleaseProductRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CancelReleaseProductOutcome()>>(
[this, request]()
{
return this->cancelReleaseProduct(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::ClearEdgeInstanceDriverConfigsOutcome IotClient::clearEdgeInstanceDriverConfigs(const ClearEdgeInstanceDriverConfigsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1815,6 +1851,42 @@ IotClient::CreateEdgeInstanceDeploymentOutcomeCallable IotClient::createEdgeInst
return task->get_future();
}
IotClient::CreateEdgeInstanceMessageRoutingOutcome IotClient::createEdgeInstanceMessageRouting(const CreateEdgeInstanceMessageRoutingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateEdgeInstanceMessageRoutingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateEdgeInstanceMessageRoutingOutcome(CreateEdgeInstanceMessageRoutingResult(outcome.result()));
else
return CreateEdgeInstanceMessageRoutingOutcome(outcome.error());
}
void IotClient::createEdgeInstanceMessageRoutingAsync(const CreateEdgeInstanceMessageRoutingRequest& request, const CreateEdgeInstanceMessageRoutingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createEdgeInstanceMessageRouting(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::CreateEdgeInstanceMessageRoutingOutcomeCallable IotClient::createEdgeInstanceMessageRoutingCallable(const CreateEdgeInstanceMessageRoutingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateEdgeInstanceMessageRoutingOutcome()>>(
[this, request]()
{
return this->createEdgeInstanceMessageRouting(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::CreateEdgeOssPreSignedAddressOutcome IotClient::createEdgeOssPreSignedAddress(const CreateEdgeOssPreSignedAddressRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2895,6 +2967,42 @@ IotClient::DeleteEdgeInstanceOutcomeCallable IotClient::deleteEdgeInstanceCallab
return task->get_future();
}
IotClient::DeleteEdgeInstanceMessageRoutingOutcome IotClient::deleteEdgeInstanceMessageRouting(const DeleteEdgeInstanceMessageRoutingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteEdgeInstanceMessageRoutingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteEdgeInstanceMessageRoutingOutcome(DeleteEdgeInstanceMessageRoutingResult(outcome.result()));
else
return DeleteEdgeInstanceMessageRoutingOutcome(outcome.error());
}
void IotClient::deleteEdgeInstanceMessageRoutingAsync(const DeleteEdgeInstanceMessageRoutingRequest& request, const DeleteEdgeInstanceMessageRoutingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteEdgeInstanceMessageRouting(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::DeleteEdgeInstanceMessageRoutingOutcomeCallable IotClient::deleteEdgeInstanceMessageRoutingCallable(const DeleteEdgeInstanceMessageRoutingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteEdgeInstanceMessageRoutingOutcome()>>(
[this, request]()
{
return this->deleteEdgeInstanceMessageRouting(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::DeleteJobOutcome IotClient::deleteJob(const DeleteJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3219,6 +3327,42 @@ IotClient::DeleteSceneRuleOutcomeCallable IotClient::deleteSceneRuleCallable(con
return task->get_future();
}
IotClient::DeleteSpeechOutcome IotClient::deleteSpeech(const DeleteSpeechRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteSpeechOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteSpeechOutcome(DeleteSpeechResult(outcome.result()));
else
return DeleteSpeechOutcome(outcome.error());
}
void IotClient::deleteSpeechAsync(const DeleteSpeechRequest& request, const DeleteSpeechAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteSpeech(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::DeleteSpeechOutcomeCallable IotClient::deleteSpeechCallable(const DeleteSpeechRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteSpeechOutcome()>>(
[this, request]()
{
return this->deleteSpeech(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::DeleteSubscribeRelationOutcome IotClient::deleteSubscribeRelation(const DeleteSubscribeRelationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3327,6 +3471,78 @@ IotClient::DeleteTopicRouteTableOutcomeCallable IotClient::deleteTopicRouteTable
return task->get_future();
}
IotClient::DisableDeviceTunnelOutcome IotClient::disableDeviceTunnel(const DisableDeviceTunnelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DisableDeviceTunnelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DisableDeviceTunnelOutcome(DisableDeviceTunnelResult(outcome.result()));
else
return DisableDeviceTunnelOutcome(outcome.error());
}
void IotClient::disableDeviceTunnelAsync(const DisableDeviceTunnelRequest& request, const DisableDeviceTunnelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, disableDeviceTunnel(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::DisableDeviceTunnelOutcomeCallable IotClient::disableDeviceTunnelCallable(const DisableDeviceTunnelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DisableDeviceTunnelOutcome()>>(
[this, request]()
{
return this->disableDeviceTunnel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::DisableDeviceTunnelShareOutcome IotClient::disableDeviceTunnelShare(const DisableDeviceTunnelShareRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DisableDeviceTunnelShareOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DisableDeviceTunnelShareOutcome(DisableDeviceTunnelShareResult(outcome.result()));
else
return DisableDeviceTunnelShareOutcome(outcome.error());
}
void IotClient::disableDeviceTunnelShareAsync(const DisableDeviceTunnelShareRequest& request, const DisableDeviceTunnelShareAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, disableDeviceTunnelShare(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::DisableDeviceTunnelShareOutcomeCallable IotClient::disableDeviceTunnelShareCallable(const DisableDeviceTunnelShareRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DisableDeviceTunnelShareOutcome()>>(
[this, request]()
{
return this->disableDeviceTunnelShare(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::DisableSceneRuleOutcome IotClient::disableSceneRule(const DisableSceneRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3399,6 +3615,78 @@ IotClient::DisableThingOutcomeCallable IotClient::disableThingCallable(const Dis
return task->get_future();
}
IotClient::EnableDeviceTunnelOutcome IotClient::enableDeviceTunnel(const EnableDeviceTunnelRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EnableDeviceTunnelOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EnableDeviceTunnelOutcome(EnableDeviceTunnelResult(outcome.result()));
else
return EnableDeviceTunnelOutcome(outcome.error());
}
void IotClient::enableDeviceTunnelAsync(const EnableDeviceTunnelRequest& request, const EnableDeviceTunnelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, enableDeviceTunnel(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::EnableDeviceTunnelOutcomeCallable IotClient::enableDeviceTunnelCallable(const EnableDeviceTunnelRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EnableDeviceTunnelOutcome()>>(
[this, request]()
{
return this->enableDeviceTunnel(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::EnableDeviceTunnelShareOutcome IotClient::enableDeviceTunnelShare(const EnableDeviceTunnelShareRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return EnableDeviceTunnelShareOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return EnableDeviceTunnelShareOutcome(EnableDeviceTunnelShareResult(outcome.result()));
else
return EnableDeviceTunnelShareOutcome(outcome.error());
}
void IotClient::enableDeviceTunnelShareAsync(const EnableDeviceTunnelShareRequest& request, const EnableDeviceTunnelShareAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, enableDeviceTunnelShare(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::EnableDeviceTunnelShareOutcomeCallable IotClient::enableDeviceTunnelShareCallable(const EnableDeviceTunnelShareRequest &request) const
{
auto task = std::make_shared<std::packaged_task<EnableDeviceTunnelShareOutcome()>>(
[this, request]()
{
return this->enableDeviceTunnelShare(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::EnableSceneRuleOutcome IotClient::enableSceneRule(const EnableSceneRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3687,6 +3975,78 @@ IotClient::GetDeviceStatusOutcomeCallable IotClient::getDeviceStatusCallable(con
return task->get_future();
}
IotClient::GetDeviceTunnelShareStatusOutcome IotClient::getDeviceTunnelShareStatus(const GetDeviceTunnelShareStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetDeviceTunnelShareStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetDeviceTunnelShareStatusOutcome(GetDeviceTunnelShareStatusResult(outcome.result()));
else
return GetDeviceTunnelShareStatusOutcome(outcome.error());
}
void IotClient::getDeviceTunnelShareStatusAsync(const GetDeviceTunnelShareStatusRequest& request, const GetDeviceTunnelShareStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getDeviceTunnelShareStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::GetDeviceTunnelShareStatusOutcomeCallable IotClient::getDeviceTunnelShareStatusCallable(const GetDeviceTunnelShareStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetDeviceTunnelShareStatusOutcome()>>(
[this, request]()
{
return this->getDeviceTunnelShareStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::GetDeviceTunnelStatusOutcome IotClient::getDeviceTunnelStatus(const GetDeviceTunnelStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetDeviceTunnelStatusOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetDeviceTunnelStatusOutcome(GetDeviceTunnelStatusResult(outcome.result()));
else
return GetDeviceTunnelStatusOutcome(outcome.error());
}
void IotClient::getDeviceTunnelStatusAsync(const GetDeviceTunnelStatusRequest& request, const GetDeviceTunnelStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getDeviceTunnelStatus(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::GetDeviceTunnelStatusOutcomeCallable IotClient::getDeviceTunnelStatusCallable(const GetDeviceTunnelStatusRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetDeviceTunnelStatusOutcome()>>(
[this, request]()
{
return this->getDeviceTunnelStatus(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::GetEdgeDriverVersionOutcome IotClient::getEdgeDriverVersion(const GetEdgeDriverVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -3795,6 +4155,42 @@ IotClient::GetEdgeInstanceDeploymentOutcomeCallable IotClient::getEdgeInstanceDe
return task->get_future();
}
IotClient::GetEdgeInstanceMessageRoutingOutcome IotClient::getEdgeInstanceMessageRouting(const GetEdgeInstanceMessageRoutingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetEdgeInstanceMessageRoutingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetEdgeInstanceMessageRoutingOutcome(GetEdgeInstanceMessageRoutingResult(outcome.result()));
else
return GetEdgeInstanceMessageRoutingOutcome(outcome.error());
}
void IotClient::getEdgeInstanceMessageRoutingAsync(const GetEdgeInstanceMessageRoutingRequest& request, const GetEdgeInstanceMessageRoutingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getEdgeInstanceMessageRouting(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::GetEdgeInstanceMessageRoutingOutcomeCallable IotClient::getEdgeInstanceMessageRoutingCallable(const GetEdgeInstanceMessageRoutingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetEdgeInstanceMessageRoutingOutcome()>>(
[this, request]()
{
return this->getEdgeInstanceMessageRouting(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::GetGatewayBySubDeviceOutcome IotClient::getGatewayBySubDevice(const GetGatewayBySubDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -6819,6 +7215,42 @@ IotClient::QueryEdgeInstanceHistoricDeploymentOutcomeCallable IotClient::queryEd
return task->get_future();
}
IotClient::QueryEdgeInstanceMessageRoutingOutcome IotClient::queryEdgeInstanceMessageRouting(const QueryEdgeInstanceMessageRoutingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return QueryEdgeInstanceMessageRoutingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return QueryEdgeInstanceMessageRoutingOutcome(QueryEdgeInstanceMessageRoutingResult(outcome.result()));
else
return QueryEdgeInstanceMessageRoutingOutcome(outcome.error());
}
void IotClient::queryEdgeInstanceMessageRoutingAsync(const QueryEdgeInstanceMessageRoutingRequest& request, const QueryEdgeInstanceMessageRoutingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, queryEdgeInstanceMessageRouting(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::QueryEdgeInstanceMessageRoutingOutcomeCallable IotClient::queryEdgeInstanceMessageRoutingCallable(const QueryEdgeInstanceMessageRoutingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<QueryEdgeInstanceMessageRoutingOutcome()>>(
[this, request]()
{
return this->queryEdgeInstanceMessageRouting(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::QueryEdgeInstanceSceneRuleOutcome IotClient::queryEdgeInstanceSceneRule(const QueryEdgeInstanceSceneRuleRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -7647,6 +8079,42 @@ IotClient::RRpcOutcomeCallable IotClient::rRpcCallable(const RRpcRequest &reques
return task->get_future();
}
IotClient::RefreshDeviceTunnelSharePasswordOutcome IotClient::refreshDeviceTunnelSharePassword(const RefreshDeviceTunnelSharePasswordRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RefreshDeviceTunnelSharePasswordOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RefreshDeviceTunnelSharePasswordOutcome(RefreshDeviceTunnelSharePasswordResult(outcome.result()));
else
return RefreshDeviceTunnelSharePasswordOutcome(outcome.error());
}
void IotClient::refreshDeviceTunnelSharePasswordAsync(const RefreshDeviceTunnelSharePasswordRequest& request, const RefreshDeviceTunnelSharePasswordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, refreshDeviceTunnelSharePassword(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::RefreshDeviceTunnelSharePasswordOutcomeCallable IotClient::refreshDeviceTunnelSharePasswordCallable(const RefreshDeviceTunnelSharePasswordRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RefreshDeviceTunnelSharePasswordOutcome()>>(
[this, request]()
{
return this->refreshDeviceTunnelSharePassword(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::RegisterDeviceOutcome IotClient::registerDevice(const RegisterDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -7719,6 +8187,42 @@ IotClient::ReleaseEdgeDriverVersionOutcomeCallable IotClient::releaseEdgeDriverV
return task->get_future();
}
IotClient::ReleaseProductOutcome IotClient::releaseProduct(const ReleaseProductRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ReleaseProductOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ReleaseProductOutcome(ReleaseProductResult(outcome.result()));
else
return ReleaseProductOutcome(outcome.error());
}
void IotClient::releaseProductAsync(const ReleaseProductRequest& request, const ReleaseProductAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, releaseProduct(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::ReleaseProductOutcomeCallable IotClient::releaseProductCallable(const ReleaseProductRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ReleaseProductOutcome()>>(
[this, request]()
{
return this->releaseProduct(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::RemoveThingTopoOutcome IotClient::removeThingTopo(const RemoveThingTopoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -8655,6 +9159,42 @@ IotClient::UpdateEdgeInstanceChannelOutcomeCallable IotClient::updateEdgeInstanc
return task->get_future();
}
IotClient::UpdateEdgeInstanceMessageRoutingOutcome IotClient::updateEdgeInstanceMessageRouting(const UpdateEdgeInstanceMessageRoutingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateEdgeInstanceMessageRoutingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateEdgeInstanceMessageRoutingOutcome(UpdateEdgeInstanceMessageRoutingResult(outcome.result()));
else
return UpdateEdgeInstanceMessageRoutingOutcome(outcome.error());
}
void IotClient::updateEdgeInstanceMessageRoutingAsync(const UpdateEdgeInstanceMessageRoutingRequest& request, const UpdateEdgeInstanceMessageRoutingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateEdgeInstanceMessageRouting(request), context);
};
asyncExecute(new Runnable(fn));
}
IotClient::UpdateEdgeInstanceMessageRoutingOutcomeCallable IotClient::updateEdgeInstanceMessageRoutingCallable(const UpdateEdgeInstanceMessageRoutingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateEdgeInstanceMessageRoutingOutcome()>>(
[this, request]()
{
return this->updateEdgeInstanceMessageRouting(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
IotClient::UpdateJobOutcome IotClient::updateJob(const UpdateJobRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -27,6 +27,17 @@ BatchGetDeviceStateRequest::BatchGetDeviceStateRequest() :
BatchGetDeviceStateRequest::~BatchGetDeviceStateRequest()
{}
std::string BatchGetDeviceStateRequest::getRealTenantId()const
{
return realTenantId_;
}
void BatchGetDeviceStateRequest::setRealTenantId(const std::string& realTenantId)
{
realTenantId_ = realTenantId;
setParameter("RealTenantId", realTenantId);
}
std::string BatchGetDeviceStateRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -38,6 +49,17 @@ void BatchGetDeviceStateRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
std::string BatchGetDeviceStateRequest::getRealTripartiteKey()const
{
return realTripartiteKey_;
}
void BatchGetDeviceStateRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
{
realTripartiteKey_ = realTripartiteKey;
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::vector<std::string> BatchGetDeviceStateRequest::getIotId()const
{
return iotId_;

View File

@@ -0,0 +1,117 @@
/*
* 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/iot/model/CancelReleaseProductRequest.h>
using AlibabaCloud::Iot::Model::CancelReleaseProductRequest;
CancelReleaseProductRequest::CancelReleaseProductRequest() :
RpcServiceRequest("iot", "2018-01-20", "CancelReleaseProduct")
{
setMethod(HttpRequest::Method::Post);
}
CancelReleaseProductRequest::~CancelReleaseProductRequest()
{}
std::string CancelReleaseProductRequest::getRealTenantId()const
{
return realTenantId_;
}
void CancelReleaseProductRequest::setRealTenantId(const std::string& realTenantId)
{
realTenantId_ = realTenantId;
setParameter("RealTenantId", realTenantId);
}
std::string CancelReleaseProductRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CancelReleaseProductRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CancelReleaseProductRequest::getRealTripartiteKey()const
{
return realTripartiteKey_;
}
void CancelReleaseProductRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
{
realTripartiteKey_ = realTripartiteKey;
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string CancelReleaseProductRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void CancelReleaseProductRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string CancelReleaseProductRequest::getProductKey()const
{
return productKey_;
}
void CancelReleaseProductRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string CancelReleaseProductRequest::getApiProduct()const
{
return apiProduct_;
}
void CancelReleaseProductRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string CancelReleaseProductRequest::getApiRevision()const
{
return apiRevision_;
}
void CancelReleaseProductRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string CancelReleaseProductRequest::getBizTenantId()const
{
return bizTenantId_;
}
void CancelReleaseProductRequest::setBizTenantId(const std::string& bizTenantId)
{
bizTenantId_ = bizTenantId;
setParameter("BizTenantId", bizTenantId);
}

View 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/iot/model/CancelReleaseProductResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
CancelReleaseProductResult::CancelReleaseProductResult() :
ServiceResult()
{}
CancelReleaseProductResult::CancelReleaseProductResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CancelReleaseProductResult::~CancelReleaseProductResult()
{}
void CancelReleaseProductResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string CancelReleaseProductResult::getErrorMessage()const
{
return errorMessage_;
}
std::string CancelReleaseProductResult::getCode()const
{
return code_;
}
bool CancelReleaseProductResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,161 @@
/*
* 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/iot/model/CreateEdgeInstanceMessageRoutingRequest.h>
using AlibabaCloud::Iot::Model::CreateEdgeInstanceMessageRoutingRequest;
CreateEdgeInstanceMessageRoutingRequest::CreateEdgeInstanceMessageRoutingRequest() :
RpcServiceRequest("iot", "2018-01-20", "CreateEdgeInstanceMessageRouting")
{
setMethod(HttpRequest::Method::Post);
}
CreateEdgeInstanceMessageRoutingRequest::~CreateEdgeInstanceMessageRoutingRequest()
{}
std::string CreateEdgeInstanceMessageRoutingRequest::getSourceData()const
{
return sourceData_;
}
void CreateEdgeInstanceMessageRoutingRequest::setSourceData(const std::string& sourceData)
{
sourceData_ = sourceData;
setParameter("SourceData", sourceData);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getTargetType()const
{
return targetType_;
}
void CreateEdgeInstanceMessageRoutingRequest::setTargetType(const std::string& targetType)
{
targetType_ = targetType;
setParameter("TargetType", targetType);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateEdgeInstanceMessageRoutingRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void CreateEdgeInstanceMessageRoutingRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getSourceType()const
{
return sourceType_;
}
void CreateEdgeInstanceMessageRoutingRequest::setSourceType(const std::string& sourceType)
{
sourceType_ = sourceType;
setParameter("SourceType", sourceType);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getTopicFilter()const
{
return topicFilter_;
}
void CreateEdgeInstanceMessageRoutingRequest::setTopicFilter(const std::string& topicFilter)
{
topicFilter_ = topicFilter;
setParameter("TopicFilter", topicFilter);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getInstanceId()const
{
return instanceId_;
}
void CreateEdgeInstanceMessageRoutingRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getTargetData()const
{
return targetData_;
}
void CreateEdgeInstanceMessageRoutingRequest::setTargetData(const std::string& targetData)
{
targetData_ = targetData;
setParameter("TargetData", targetData);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getApiProduct()const
{
return apiProduct_;
}
void CreateEdgeInstanceMessageRoutingRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getName()const
{
return name_;
}
void CreateEdgeInstanceMessageRoutingRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string CreateEdgeInstanceMessageRoutingRequest::getApiRevision()const
{
return apiRevision_;
}
void CreateEdgeInstanceMessageRoutingRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
int CreateEdgeInstanceMessageRoutingRequest::getTargetIotHubQos()const
{
return targetIotHubQos_;
}
void CreateEdgeInstanceMessageRoutingRequest::setTargetIotHubQos(int targetIotHubQos)
{
targetIotHubQos_ = targetIotHubQos;
setParameter("TargetIotHubQos", std::to_string(targetIotHubQos));
}

View 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/iot/model/CreateEdgeInstanceMessageRoutingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
CreateEdgeInstanceMessageRoutingResult::CreateEdgeInstanceMessageRoutingResult() :
ServiceResult()
{}
CreateEdgeInstanceMessageRoutingResult::CreateEdgeInstanceMessageRoutingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateEdgeInstanceMessageRoutingResult::~CreateEdgeInstanceMessageRoutingResult()
{}
void CreateEdgeInstanceMessageRoutingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["RouteId"].isNull())
routeId_ = std::stol(value["RouteId"].asString());
}
long CreateEdgeInstanceMessageRoutingResult::getRouteId()const
{
return routeId_;
}
std::string CreateEdgeInstanceMessageRoutingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string CreateEdgeInstanceMessageRoutingResult::getCode()const
{
return code_;
}
bool CreateEdgeInstanceMessageRoutingResult::getSuccess()const
{
return success_;
}

View File

@@ -148,3 +148,14 @@ void CreateJobRequest::setApiRevision(const std::string& apiRevision)
setBodyParameter("ApiRevision", apiRevision);
}
long CreateJobRequest::getScheduledTime()const
{
return scheduledTime_;
}
void CreateJobRequest::setScheduledTime(long scheduledTime)
{
scheduledTime_ = scheduledTime;
setParameter("ScheduledTime", std::to_string(scheduledTime));
}

View File

@@ -27,6 +27,17 @@ DeleteDevicePropRequest::DeleteDevicePropRequest() :
DeleteDevicePropRequest::~DeleteDevicePropRequest()
{}
std::string DeleteDevicePropRequest::getRealTenantId()const
{
return realTenantId_;
}
void DeleteDevicePropRequest::setRealTenantId(const std::string& realTenantId)
{
realTenantId_ = realTenantId;
setParameter("RealTenantId", realTenantId);
}
std::string DeleteDevicePropRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -49,6 +60,17 @@ void DeleteDevicePropRequest::setPropKey(const std::string& propKey)
setParameter("PropKey", propKey);
}
std::string DeleteDevicePropRequest::getRealTripartiteKey()const
{
return realTripartiteKey_;
}
void DeleteDevicePropRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
{
realTripartiteKey_ = realTripartiteKey;
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string DeleteDevicePropRequest::getIotId()const
{
return iotId_;

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/DeleteEdgeInstanceMessageRoutingRequest.h>
using AlibabaCloud::Iot::Model::DeleteEdgeInstanceMessageRoutingRequest;
DeleteEdgeInstanceMessageRoutingRequest::DeleteEdgeInstanceMessageRoutingRequest() :
RpcServiceRequest("iot", "2018-01-20", "DeleteEdgeInstanceMessageRouting")
{
setMethod(HttpRequest::Method::Post);
}
DeleteEdgeInstanceMessageRoutingRequest::~DeleteEdgeInstanceMessageRoutingRequest()
{}
std::string DeleteEdgeInstanceMessageRoutingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteEdgeInstanceMessageRoutingRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DeleteEdgeInstanceMessageRoutingRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void DeleteEdgeInstanceMessageRoutingRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string DeleteEdgeInstanceMessageRoutingRequest::getInstanceId()const
{
return instanceId_;
}
void DeleteEdgeInstanceMessageRoutingRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
long DeleteEdgeInstanceMessageRoutingRequest::getRouteId()const
{
return routeId_;
}
void DeleteEdgeInstanceMessageRoutingRequest::setRouteId(long routeId)
{
routeId_ = routeId;
setParameter("RouteId", std::to_string(routeId));
}
std::string DeleteEdgeInstanceMessageRoutingRequest::getApiProduct()const
{
return apiProduct_;
}
void DeleteEdgeInstanceMessageRoutingRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string DeleteEdgeInstanceMessageRoutingRequest::getApiRevision()const
{
return apiRevision_;
}
void DeleteEdgeInstanceMessageRoutingRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View 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/iot/model/DeleteEdgeInstanceMessageRoutingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteEdgeInstanceMessageRoutingResult::DeleteEdgeInstanceMessageRoutingResult() :
ServiceResult()
{}
DeleteEdgeInstanceMessageRoutingResult::DeleteEdgeInstanceMessageRoutingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteEdgeInstanceMessageRoutingResult::~DeleteEdgeInstanceMessageRoutingResult()
{}
void DeleteEdgeInstanceMessageRoutingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteEdgeInstanceMessageRoutingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteEdgeInstanceMessageRoutingResult::getCode()const
{
return code_;
}
bool DeleteEdgeInstanceMessageRoutingResult::getSuccess()const
{
return success_;
}

View 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/iot/model/DeleteSpeechRequest.h>
using AlibabaCloud::Iot::Model::DeleteSpeechRequest;
DeleteSpeechRequest::DeleteSpeechRequest() :
RpcServiceRequest("iot", "2018-01-20", "DeleteSpeech")
{
setMethod(HttpRequest::Method::Post);
}
DeleteSpeechRequest::~DeleteSpeechRequest()
{}
std::string DeleteSpeechRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void DeleteSpeechRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setBodyParameter("IotInstanceId", iotInstanceId);
}
std::vector<std::string> DeleteSpeechRequest::getSpeechCodeList()const
{
return speechCodeList_;
}
void DeleteSpeechRequest::setSpeechCodeList(const std::vector<std::string>& speechCodeList)
{
speechCodeList_ = speechCodeList;
for(int dep1 = 0; dep1!= speechCodeList.size(); dep1++) {
setBodyParameter("SpeechCodeList."+ std::to_string(dep1), speechCodeList.at(dep1));
}
}
std::string DeleteSpeechRequest::getApiProduct()const
{
return apiProduct_;
}
void DeleteSpeechRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string DeleteSpeechRequest::getApiRevision()const
{
return apiRevision_;
}
void DeleteSpeechRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View 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/iot/model/DeleteSpeechResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DeleteSpeechResult::DeleteSpeechResult() :
ServiceResult()
{}
DeleteSpeechResult::DeleteSpeechResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteSpeechResult::~DeleteSpeechResult()
{}
void DeleteSpeechResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteSpeechResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DeleteSpeechResult::getCode()const
{
return code_;
}
bool DeleteSpeechResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/DisableDeviceTunnelRequest.h>
using AlibabaCloud::Iot::Model::DisableDeviceTunnelRequest;
DisableDeviceTunnelRequest::DisableDeviceTunnelRequest() :
RpcServiceRequest("iot", "2018-01-20", "DisableDeviceTunnel")
{
setMethod(HttpRequest::Method::Post);
}
DisableDeviceTunnelRequest::~DisableDeviceTunnelRequest()
{}
std::string DisableDeviceTunnelRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DisableDeviceTunnelRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DisableDeviceTunnelRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void DisableDeviceTunnelRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string DisableDeviceTunnelRequest::getProductKey()const
{
return productKey_;
}
void DisableDeviceTunnelRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string DisableDeviceTunnelRequest::getApiProduct()const
{
return apiProduct_;
}
void DisableDeviceTunnelRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string DisableDeviceTunnelRequest::getApiRevision()const
{
return apiRevision_;
}
void DisableDeviceTunnelRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string DisableDeviceTunnelRequest::getDeviceName()const
{
return deviceName_;
}
void DisableDeviceTunnelRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/DisableDeviceTunnelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DisableDeviceTunnelResult::DisableDeviceTunnelResult() :
ServiceResult()
{}
DisableDeviceTunnelResult::DisableDeviceTunnelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableDeviceTunnelResult::~DisableDeviceTunnelResult()
{}
void DisableDeviceTunnelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DisableDeviceTunnelResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DisableDeviceTunnelResult::getCode()const
{
return code_;
}
bool DisableDeviceTunnelResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/DisableDeviceTunnelShareRequest.h>
using AlibabaCloud::Iot::Model::DisableDeviceTunnelShareRequest;
DisableDeviceTunnelShareRequest::DisableDeviceTunnelShareRequest() :
RpcServiceRequest("iot", "2018-01-20", "DisableDeviceTunnelShare")
{
setMethod(HttpRequest::Method::Post);
}
DisableDeviceTunnelShareRequest::~DisableDeviceTunnelShareRequest()
{}
std::string DisableDeviceTunnelShareRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DisableDeviceTunnelShareRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string DisableDeviceTunnelShareRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void DisableDeviceTunnelShareRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string DisableDeviceTunnelShareRequest::getProductKey()const
{
return productKey_;
}
void DisableDeviceTunnelShareRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string DisableDeviceTunnelShareRequest::getApiProduct()const
{
return apiProduct_;
}
void DisableDeviceTunnelShareRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string DisableDeviceTunnelShareRequest::getApiRevision()const
{
return apiRevision_;
}
void DisableDeviceTunnelShareRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string DisableDeviceTunnelShareRequest::getDeviceName()const
{
return deviceName_;
}
void DisableDeviceTunnelShareRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/DisableDeviceTunnelShareResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
DisableDeviceTunnelShareResult::DisableDeviceTunnelShareResult() :
ServiceResult()
{}
DisableDeviceTunnelShareResult::DisableDeviceTunnelShareResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DisableDeviceTunnelShareResult::~DisableDeviceTunnelShareResult()
{}
void DisableDeviceTunnelShareResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DisableDeviceTunnelShareResult::getErrorMessage()const
{
return errorMessage_;
}
std::string DisableDeviceTunnelShareResult::getCode()const
{
return code_;
}
bool DisableDeviceTunnelShareResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/EnableDeviceTunnelRequest.h>
using AlibabaCloud::Iot::Model::EnableDeviceTunnelRequest;
EnableDeviceTunnelRequest::EnableDeviceTunnelRequest() :
RpcServiceRequest("iot", "2018-01-20", "EnableDeviceTunnel")
{
setMethod(HttpRequest::Method::Post);
}
EnableDeviceTunnelRequest::~EnableDeviceTunnelRequest()
{}
std::string EnableDeviceTunnelRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void EnableDeviceTunnelRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string EnableDeviceTunnelRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void EnableDeviceTunnelRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string EnableDeviceTunnelRequest::getProductKey()const
{
return productKey_;
}
void EnableDeviceTunnelRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string EnableDeviceTunnelRequest::getApiProduct()const
{
return apiProduct_;
}
void EnableDeviceTunnelRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string EnableDeviceTunnelRequest::getApiRevision()const
{
return apiRevision_;
}
void EnableDeviceTunnelRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string EnableDeviceTunnelRequest::getDeviceName()const
{
return deviceName_;
}
void EnableDeviceTunnelRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/EnableDeviceTunnelResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
EnableDeviceTunnelResult::EnableDeviceTunnelResult() :
ServiceResult()
{}
EnableDeviceTunnelResult::EnableDeviceTunnelResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableDeviceTunnelResult::~EnableDeviceTunnelResult()
{}
void EnableDeviceTunnelResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string EnableDeviceTunnelResult::getErrorMessage()const
{
return errorMessage_;
}
std::string EnableDeviceTunnelResult::getCode()const
{
return code_;
}
bool EnableDeviceTunnelResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/EnableDeviceTunnelShareRequest.h>
using AlibabaCloud::Iot::Model::EnableDeviceTunnelShareRequest;
EnableDeviceTunnelShareRequest::EnableDeviceTunnelShareRequest() :
RpcServiceRequest("iot", "2018-01-20", "EnableDeviceTunnelShare")
{
setMethod(HttpRequest::Method::Post);
}
EnableDeviceTunnelShareRequest::~EnableDeviceTunnelShareRequest()
{}
std::string EnableDeviceTunnelShareRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void EnableDeviceTunnelShareRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string EnableDeviceTunnelShareRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void EnableDeviceTunnelShareRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string EnableDeviceTunnelShareRequest::getProductKey()const
{
return productKey_;
}
void EnableDeviceTunnelShareRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string EnableDeviceTunnelShareRequest::getApiProduct()const
{
return apiProduct_;
}
void EnableDeviceTunnelShareRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string EnableDeviceTunnelShareRequest::getApiRevision()const
{
return apiRevision_;
}
void EnableDeviceTunnelShareRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string EnableDeviceTunnelShareRequest::getDeviceName()const
{
return deviceName_;
}
void EnableDeviceTunnelShareRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/EnableDeviceTunnelShareResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
EnableDeviceTunnelShareResult::EnableDeviceTunnelShareResult() :
ServiceResult()
{}
EnableDeviceTunnelShareResult::EnableDeviceTunnelShareResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
EnableDeviceTunnelShareResult::~EnableDeviceTunnelShareResult()
{}
void EnableDeviceTunnelShareResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string EnableDeviceTunnelShareResult::getErrorMessage()const
{
return errorMessage_;
}
std::string EnableDeviceTunnelShareResult::getCode()const
{
return code_;
}
bool EnableDeviceTunnelShareResult::getSuccess()const
{
return success_;
}

View File

@@ -42,6 +42,8 @@ void GetDeviceStatusResult::parse(const std::string &payload)
auto dataNode = value["Data"];
if(!dataNode["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["Timestamp"].isNull())
data_.timestamp = std::stol(dataNode["Timestamp"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/GetDeviceTunnelShareStatusRequest.h>
using AlibabaCloud::Iot::Model::GetDeviceTunnelShareStatusRequest;
GetDeviceTunnelShareStatusRequest::GetDeviceTunnelShareStatusRequest() :
RpcServiceRequest("iot", "2018-01-20", "GetDeviceTunnelShareStatus")
{
setMethod(HttpRequest::Method::Post);
}
GetDeviceTunnelShareStatusRequest::~GetDeviceTunnelShareStatusRequest()
{}
std::string GetDeviceTunnelShareStatusRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetDeviceTunnelShareStatusRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetDeviceTunnelShareStatusRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void GetDeviceTunnelShareStatusRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string GetDeviceTunnelShareStatusRequest::getProductKey()const
{
return productKey_;
}
void GetDeviceTunnelShareStatusRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string GetDeviceTunnelShareStatusRequest::getApiProduct()const
{
return apiProduct_;
}
void GetDeviceTunnelShareStatusRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string GetDeviceTunnelShareStatusRequest::getApiRevision()const
{
return apiRevision_;
}
void GetDeviceTunnelShareStatusRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string GetDeviceTunnelShareStatusRequest::getDeviceName()const
{
return deviceName_;
}
void GetDeviceTunnelShareStatusRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/GetDeviceTunnelShareStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetDeviceTunnelShareStatusResult::GetDeviceTunnelShareStatusResult() :
ServiceResult()
{}
GetDeviceTunnelShareStatusResult::GetDeviceTunnelShareStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDeviceTunnelShareStatusResult::~GetDeviceTunnelShareStatusResult()
{}
void GetDeviceTunnelShareStatusResult::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["ShareId"].isNull())
data_.shareId = dataNode["ShareId"].asString();
if(!dataNode["Password"].isNull())
data_.password = dataNode["Password"].asString();
if(!dataNode["IsOpen"].isNull())
data_.isOpen = dataNode["IsOpen"].asString() == "true";
if(!dataNode["GmtOpened"].isNull())
data_.gmtOpened = std::stol(dataNode["GmtOpened"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
GetDeviceTunnelShareStatusResult::Data GetDeviceTunnelShareStatusResult::getData()const
{
return data_;
}
std::string GetDeviceTunnelShareStatusResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetDeviceTunnelShareStatusResult::getCode()const
{
return code_;
}
bool GetDeviceTunnelShareStatusResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/GetDeviceTunnelStatusRequest.h>
using AlibabaCloud::Iot::Model::GetDeviceTunnelStatusRequest;
GetDeviceTunnelStatusRequest::GetDeviceTunnelStatusRequest() :
RpcServiceRequest("iot", "2018-01-20", "GetDeviceTunnelStatus")
{
setMethod(HttpRequest::Method::Post);
}
GetDeviceTunnelStatusRequest::~GetDeviceTunnelStatusRequest()
{}
std::string GetDeviceTunnelStatusRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetDeviceTunnelStatusRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetDeviceTunnelStatusRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void GetDeviceTunnelStatusRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string GetDeviceTunnelStatusRequest::getProductKey()const
{
return productKey_;
}
void GetDeviceTunnelStatusRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string GetDeviceTunnelStatusRequest::getApiProduct()const
{
return apiProduct_;
}
void GetDeviceTunnelStatusRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string GetDeviceTunnelStatusRequest::getApiRevision()const
{
return apiRevision_;
}
void GetDeviceTunnelStatusRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string GetDeviceTunnelStatusRequest::getDeviceName()const
{
return deviceName_;
}
void GetDeviceTunnelStatusRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/GetDeviceTunnelStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetDeviceTunnelStatusResult::GetDeviceTunnelStatusResult() :
ServiceResult()
{}
GetDeviceTunnelStatusResult::GetDeviceTunnelStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetDeviceTunnelStatusResult::~GetDeviceTunnelStatusResult()
{}
void GetDeviceTunnelStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Data"].isNull())
data_ = value["Data"].asString();
}
std::string GetDeviceTunnelStatusResult::getData()const
{
return data_;
}
std::string GetDeviceTunnelStatusResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetDeviceTunnelStatusResult::getCode()const
{
return code_;
}
bool GetDeviceTunnelStatusResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/GetEdgeInstanceMessageRoutingRequest.h>
using AlibabaCloud::Iot::Model::GetEdgeInstanceMessageRoutingRequest;
GetEdgeInstanceMessageRoutingRequest::GetEdgeInstanceMessageRoutingRequest() :
RpcServiceRequest("iot", "2018-01-20", "GetEdgeInstanceMessageRouting")
{
setMethod(HttpRequest::Method::Post);
}
GetEdgeInstanceMessageRoutingRequest::~GetEdgeInstanceMessageRoutingRequest()
{}
std::string GetEdgeInstanceMessageRoutingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetEdgeInstanceMessageRoutingRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string GetEdgeInstanceMessageRoutingRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void GetEdgeInstanceMessageRoutingRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string GetEdgeInstanceMessageRoutingRequest::getInstanceId()const
{
return instanceId_;
}
void GetEdgeInstanceMessageRoutingRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
long GetEdgeInstanceMessageRoutingRequest::getRouteId()const
{
return routeId_;
}
void GetEdgeInstanceMessageRoutingRequest::setRouteId(long routeId)
{
routeId_ = routeId;
setParameter("RouteId", std::to_string(routeId));
}
std::string GetEdgeInstanceMessageRoutingRequest::getApiProduct()const
{
return apiProduct_;
}
void GetEdgeInstanceMessageRoutingRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string GetEdgeInstanceMessageRoutingRequest::getApiRevision()const
{
return apiRevision_;
}
void GetEdgeInstanceMessageRoutingRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View File

@@ -0,0 +1,110 @@
/*
* 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/iot/model/GetEdgeInstanceMessageRoutingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
GetEdgeInstanceMessageRoutingResult::GetEdgeInstanceMessageRoutingResult() :
ServiceResult()
{}
GetEdgeInstanceMessageRoutingResult::GetEdgeInstanceMessageRoutingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetEdgeInstanceMessageRoutingResult::~GetEdgeInstanceMessageRoutingResult()
{}
void GetEdgeInstanceMessageRoutingResult::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["TopicFilter"].isNull())
data_.topicFilter = dataNode["TopicFilter"].asString();
if(!dataNode["SourceType"].isNull())
data_.sourceType = dataNode["SourceType"].asString();
if(!dataNode["Name"].isNull())
data_.name = dataNode["Name"].asString();
if(!dataNode["SourceData"].isNull())
data_.sourceData = dataNode["SourceData"].asString();
if(!dataNode["TargetType"].isNull())
data_.targetType = dataNode["TargetType"].asString();
if(!dataNode["TargetData"].isNull())
data_.targetData = dataNode["TargetData"].asString();
if(!dataNode["GmtCreate"].isNull())
data_.gmtCreate = dataNode["GmtCreate"].asString();
if(!dataNode["GmtModified"].isNull())
data_.gmtModified = dataNode["GmtModified"].asString();
if(!dataNode["GmtCreateTimestamp"].isNull())
data_.gmtCreateTimestamp = std::stol(dataNode["GmtCreateTimestamp"].asString());
if(!dataNode["GmtModifiedTimestamp"].isNull())
data_.gmtModifiedTimestamp = std::stol(dataNode["GmtModifiedTimestamp"].asString());
auto routeContextNode = dataNode["RouteContext"];
if(!routeContextNode["SourceFcServiceName"].isNull())
data_.routeContext.sourceFcServiceName = routeContextNode["SourceFcServiceName"].asString();
if(!routeContextNode["SourceFcFunctionName"].isNull())
data_.routeContext.sourceFcFunctionName = routeContextNode["SourceFcFunctionName"].asString();
if(!routeContextNode["SourceStreamName"].isNull())
data_.routeContext.sourceStreamName = routeContextNode["SourceStreamName"].asString();
if(!routeContextNode["SourceApplicationName"].isNull())
data_.routeContext.sourceApplicationName = routeContextNode["SourceApplicationName"].asString();
if(!routeContextNode["TargetFcServiceName"].isNull())
data_.routeContext.targetFcServiceName = routeContextNode["TargetFcServiceName"].asString();
if(!routeContextNode["TargetFcFunctionName"].isNull())
data_.routeContext.targetFcFunctionName = routeContextNode["TargetFcFunctionName"].asString();
if(!routeContextNode["TargetStreamName"].isNull())
data_.routeContext.targetStreamName = routeContextNode["TargetStreamName"].asString();
if(!routeContextNode["TargetApplicationName"].isNull())
data_.routeContext.targetApplicationName = routeContextNode["TargetApplicationName"].asString();
if(!routeContextNode["Qos"].isNull())
data_.routeContext.qos = routeContextNode["Qos"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
GetEdgeInstanceMessageRoutingResult::Data GetEdgeInstanceMessageRoutingResult::getData()const
{
return data_;
}
std::string GetEdgeInstanceMessageRoutingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string GetEdgeInstanceMessageRoutingResult::getCode()const
{
return code_;
}
bool GetEdgeInstanceMessageRoutingResult::getSuccess()const
{
return success_;
}

View File

@@ -71,17 +71,6 @@ void GetThingModelTslRequest::setRealTripartiteKey(const std::string& realTripar
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string GetThingModelTslRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void GetThingModelTslRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string GetThingModelTslRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -27,6 +27,17 @@ GetThingTopoRequest::GetThingTopoRequest() :
GetThingTopoRequest::~GetThingTopoRequest()
{}
std::string GetThingTopoRequest::getRealTenantId()const
{
return realTenantId_;
}
void GetThingTopoRequest::setRealTenantId(const std::string& realTenantId)
{
realTenantId_ = realTenantId;
setParameter("RealTenantId", realTenantId);
}
std::string GetThingTopoRequest::getAccessKeyId()const
{
return accessKeyId_;
@@ -38,6 +49,17 @@ void GetThingTopoRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
std::string GetThingTopoRequest::getRealTripartiteKey()const
{
return realTripartiteKey_;
}
void GetThingTopoRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
{
realTripartiteKey_ = realTripartiteKey;
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string GetThingTopoRequest::getIotId()const
{
return iotId_;

View File

@@ -27,6 +27,17 @@ ListDeviceDistributeJobRequest::ListDeviceDistributeJobRequest() :
ListDeviceDistributeJobRequest::~ListDeviceDistributeJobRequest()
{}
std::string ListDeviceDistributeJobRequest::getJobId()const
{
return jobId_;
}
void ListDeviceDistributeJobRequest::setJobId(const std::string& jobId)
{
jobId_ = jobId;
setBodyParameter("JobId", jobId);
}
int ListDeviceDistributeJobRequest::getPageSize()const
{
return pageSize_;

View File

@@ -64,12 +64,20 @@ void ListDeviceDistributeJobResult::parse(const std::string &payload)
itemsObject.status = std::stoi(dataNodeJobInfoitems["Status"].asString());
if(!dataNodeJobInfoitems["Strategy"].isNull())
itemsObject.strategy = std::stoi(dataNodeJobInfoitems["Strategy"].asString());
if(!dataNodeJobInfoitems["SourceRegion"].isNull())
itemsObject.sourceRegion = dataNodeJobInfoitems["SourceRegion"].asString();
if(!dataNodeJobInfoitems["SourceInstanceName"].isNull())
itemsObject.sourceInstanceName = dataNodeJobInfoitems["SourceInstanceName"].asString();
auto allTargetInstanceConfigsNode = dataNodeJobInfoitems["TargetInstanceConfigs"]["targetInstanceConfigsItem"];
for (auto dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem : allTargetInstanceConfigsNode)
{
Data::Items::TargetInstanceConfigsItem targetInstanceConfigsObject;
if(!dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem["TargetInstanceId"].isNull())
targetInstanceConfigsObject.targetInstanceId = dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem["TargetInstanceId"].asString();
if(!dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem["TargetRegion"].isNull())
targetInstanceConfigsObject.targetRegion = dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem["TargetRegion"].asString();
if(!dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem["TargetInstanceName"].isNull())
targetInstanceConfigsObject.targetInstanceName = dataNodeJobInfoitemsTargetInstanceConfigstargetInstanceConfigsItem["TargetInstanceName"].asString();
itemsObject.targetInstanceConfigs.push_back(targetInstanceConfigsObject);
}
data_.jobInfo.push_back(itemsObject);

View File

@@ -57,6 +57,8 @@ void ListJobResult::parse(const std::string &payload)
dataObject.description = valueDatadataItem["Description"].asString();
if(!valueDatadataItem["Type"].isNull())
dataObject.type = valueDatadataItem["Type"].asString();
if(!valueDatadataItem["ScheduledTime"].isNull())
dataObject.scheduledTime = std::stol(valueDatadataItem["ScheduledTime"].asString());
data_.push_back(dataObject);
}
if(!value["Success"].isNull())

View File

@@ -71,6 +71,8 @@ void ListOTATaskByJobResult::parse(const std::string &payload)
dataObject.iotId = valueDataSimpleOTATaskInfo["IotId"].asString();
if(!valueDataSimpleOTATaskInfo["UtcCreate"].isNull())
dataObject.utcCreate = valueDataSimpleOTATaskInfo["UtcCreate"].asString();
if(!valueDataSimpleOTATaskInfo["Timeout"].isNull())
dataObject.timeout = valueDataSimpleOTATaskInfo["Timeout"].asString();
data_.push_back(dataObject);
}
if(!value["Success"].isNull())

View File

@@ -38,17 +38,6 @@ void ListThingModelVersionRequest::setAccessKeyId(const std::string& accessKeyId
setParameter("AccessKeyId", accessKeyId);
}
std::string ListThingModelVersionRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void ListThingModelVersionRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string ListThingModelVersionRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -38,17 +38,6 @@ void ListThingTemplatesRequest::setAccessKeyId(const std::string& accessKeyId)
setParameter("AccessKeyId", accessKeyId);
}
std::string ListThingTemplatesRequest::getResourceGroupId()const
{
return resourceGroupId_;
}
void ListThingTemplatesRequest::setResourceGroupId(const std::string& resourceGroupId)
{
resourceGroupId_ = resourceGroupId;
setParameter("ResourceGroupId", resourceGroupId);
}
std::string ListThingTemplatesRequest::getIotInstanceId()const
{
return iotInstanceId_;

View File

@@ -50,6 +50,8 @@ void PrintByTemplateResult::parse(const std::string &payload)
data_.id = dataNode["Id"].asString();
if(!dataNode["RetryCount"].isNull())
data_.retryCount = std::stoi(dataNode["RetryCount"].asString());
if(!dataNode["MaxRetryCount"].isNull())
data_.maxRetryCount = std::stoi(dataNode["MaxRetryCount"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View File

@@ -27,6 +27,17 @@ QueryDeviceBySQLRequest::QueryDeviceBySQLRequest() :
QueryDeviceBySQLRequest::~QueryDeviceBySQLRequest()
{}
std::string QueryDeviceBySQLRequest::getRealTenantId()const
{
return realTenantId_;
}
void QueryDeviceBySQLRequest::setRealTenantId(const std::string& realTenantId)
{
realTenantId_ = realTenantId;
setParameter("RealTenantId", realTenantId);
}
std::string QueryDeviceBySQLRequest::getSQL()const
{
return sQL_;
@@ -38,6 +49,17 @@ void QueryDeviceBySQLRequest::setSQL(const std::string& sQL)
setParameter("SQL", sQL);
}
std::string QueryDeviceBySQLRequest::getRealTripartiteKey()const
{
return realTripartiteKey_;
}
void QueryDeviceBySQLRequest::setRealTripartiteKey(const std::string& realTripartiteKey)
{
realTripartiteKey_ = realTripartiteKey;
setParameter("RealTripartiteKey", realTripartiteKey);
}
std::string QueryDeviceBySQLRequest::getIotInstanceId()const
{
return iotInstanceId_;

View 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/iot/model/QueryEdgeInstanceMessageRoutingRequest.h>
using AlibabaCloud::Iot::Model::QueryEdgeInstanceMessageRoutingRequest;
QueryEdgeInstanceMessageRoutingRequest::QueryEdgeInstanceMessageRoutingRequest() :
RpcServiceRequest("iot", "2018-01-20", "QueryEdgeInstanceMessageRouting")
{
setMethod(HttpRequest::Method::Post);
}
QueryEdgeInstanceMessageRoutingRequest::~QueryEdgeInstanceMessageRoutingRequest()
{}
std::string QueryEdgeInstanceMessageRoutingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void QueryEdgeInstanceMessageRoutingRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string QueryEdgeInstanceMessageRoutingRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void QueryEdgeInstanceMessageRoutingRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
int QueryEdgeInstanceMessageRoutingRequest::getPageSize()const
{
return pageSize_;
}
void QueryEdgeInstanceMessageRoutingRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int QueryEdgeInstanceMessageRoutingRequest::getCurrentPage()const
{
return currentPage_;
}
void QueryEdgeInstanceMessageRoutingRequest::setCurrentPage(int currentPage)
{
currentPage_ = currentPage;
setParameter("CurrentPage", std::to_string(currentPage));
}
std::string QueryEdgeInstanceMessageRoutingRequest::getInstanceId()const
{
return instanceId_;
}
void QueryEdgeInstanceMessageRoutingRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
std::string QueryEdgeInstanceMessageRoutingRequest::getApiProduct()const
{
return apiProduct_;
}
void QueryEdgeInstanceMessageRoutingRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string QueryEdgeInstanceMessageRoutingRequest::getApiRevision()const
{
return apiRevision_;
}
void QueryEdgeInstanceMessageRoutingRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}

View File

@@ -0,0 +1,124 @@
/*
* 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/iot/model/QueryEdgeInstanceMessageRoutingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
QueryEdgeInstanceMessageRoutingResult::QueryEdgeInstanceMessageRoutingResult() :
ServiceResult()
{}
QueryEdgeInstanceMessageRoutingResult::QueryEdgeInstanceMessageRoutingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
QueryEdgeInstanceMessageRoutingResult::~QueryEdgeInstanceMessageRoutingResult()
{}
void QueryEdgeInstanceMessageRoutingResult::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["Total"].isNull())
data_.total = std::stoi(dataNode["Total"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stoi(dataNode["PageSize"].asString());
if(!dataNode["CurrentPage"].isNull())
data_.currentPage = std::stoi(dataNode["CurrentPage"].asString());
auto allMessageRouteListNode = dataNode["MessageRouteList"]["MessageRoute"];
for (auto dataNodeMessageRouteListMessageRoute : allMessageRouteListNode)
{
Data::MessageRoute messageRouteObject;
if(!dataNodeMessageRouteListMessageRoute["RouteId"].isNull())
messageRouteObject.routeId = std::stoi(dataNodeMessageRouteListMessageRoute["RouteId"].asString());
if(!dataNodeMessageRouteListMessageRoute["Name"].isNull())
messageRouteObject.name = dataNodeMessageRouteListMessageRoute["Name"].asString();
if(!dataNodeMessageRouteListMessageRoute["TopicFilter"].isNull())
messageRouteObject.topicFilter = dataNodeMessageRouteListMessageRoute["TopicFilter"].asString();
if(!dataNodeMessageRouteListMessageRoute["SourceType"].isNull())
messageRouteObject.sourceType = dataNodeMessageRouteListMessageRoute["SourceType"].asString();
if(!dataNodeMessageRouteListMessageRoute["SourceData"].isNull())
messageRouteObject.sourceData = dataNodeMessageRouteListMessageRoute["SourceData"].asString();
if(!dataNodeMessageRouteListMessageRoute["TargetType"].isNull())
messageRouteObject.targetType = dataNodeMessageRouteListMessageRoute["TargetType"].asString();
if(!dataNodeMessageRouteListMessageRoute["TargetData"].isNull())
messageRouteObject.targetData = dataNodeMessageRouteListMessageRoute["TargetData"].asString();
if(!dataNodeMessageRouteListMessageRoute["GmtCreate"].isNull())
messageRouteObject.gmtCreate = dataNodeMessageRouteListMessageRoute["GmtCreate"].asString();
if(!dataNodeMessageRouteListMessageRoute["GmtModified"].isNull())
messageRouteObject.gmtModified = dataNodeMessageRouteListMessageRoute["GmtModified"].asString();
if(!dataNodeMessageRouteListMessageRoute["GmtCreateTimestamp"].isNull())
messageRouteObject.gmtCreateTimestamp = std::stol(dataNodeMessageRouteListMessageRoute["GmtCreateTimestamp"].asString());
if(!dataNodeMessageRouteListMessageRoute["GmtModifiedTimestamp"].isNull())
messageRouteObject.gmtModifiedTimestamp = std::stol(dataNodeMessageRouteListMessageRoute["GmtModifiedTimestamp"].asString());
auto routeContextNode = value["RouteContext"];
if(!routeContextNode["SourceFcServiceName"].isNull())
messageRouteObject.routeContext.sourceFcServiceName = routeContextNode["SourceFcServiceName"].asString();
if(!routeContextNode["SourceFcFunctionName"].isNull())
messageRouteObject.routeContext.sourceFcFunctionName = routeContextNode["SourceFcFunctionName"].asString();
if(!routeContextNode["SourceStreamName"].isNull())
messageRouteObject.routeContext.sourceStreamName = routeContextNode["SourceStreamName"].asString();
if(!routeContextNode["SourceApplicationName"].isNull())
messageRouteObject.routeContext.sourceApplicationName = routeContextNode["SourceApplicationName"].asString();
if(!routeContextNode["TargetFcServiceName"].isNull())
messageRouteObject.routeContext.targetFcServiceName = routeContextNode["TargetFcServiceName"].asString();
if(!routeContextNode["TargetFcFunctionName"].isNull())
messageRouteObject.routeContext.targetFcFunctionName = routeContextNode["TargetFcFunctionName"].asString();
if(!routeContextNode["TargetStreamName"].isNull())
messageRouteObject.routeContext.targetStreamName = routeContextNode["TargetStreamName"].asString();
if(!routeContextNode["TargetApplicationName"].isNull())
messageRouteObject.routeContext.targetApplicationName = routeContextNode["TargetApplicationName"].asString();
if(!routeContextNode["Qos"].isNull())
messageRouteObject.routeContext.qos = routeContextNode["Qos"].asString();
data_.messageRouteList.push_back(messageRouteObject);
}
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
QueryEdgeInstanceMessageRoutingResult::Data QueryEdgeInstanceMessageRoutingResult::getData()const
{
return data_;
}
std::string QueryEdgeInstanceMessageRoutingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string QueryEdgeInstanceMessageRoutingResult::getCode()const
{
return code_;
}
bool QueryEdgeInstanceMessageRoutingResult::getSuccess()const
{
return success_;
}

View File

@@ -56,6 +56,8 @@ void QueryJobResult::parse(const std::string &payload)
data_.jobDocument = dataNode["JobDocument"].asString();
if(!dataNode["UtcModified"].isNull())
data_.utcModified = dataNode["UtcModified"].asString();
if(!dataNode["ScheduledTime"].isNull())
data_.scheduledTime = std::stol(dataNode["ScheduledTime"].asString());
auto rolloutConfigNode = dataNode["RolloutConfig"];
if(!rolloutConfigNode["MaximumPerMinute"].isNull())
data_.rolloutConfig.maximumPerMinute = std::stoi(rolloutConfigNode["MaximumPerMinute"].asString());

View File

@@ -0,0 +1,95 @@
/*
* 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/iot/model/RefreshDeviceTunnelSharePasswordRequest.h>
using AlibabaCloud::Iot::Model::RefreshDeviceTunnelSharePasswordRequest;
RefreshDeviceTunnelSharePasswordRequest::RefreshDeviceTunnelSharePasswordRequest() :
RpcServiceRequest("iot", "2018-01-20", "RefreshDeviceTunnelSharePassword")
{
setMethod(HttpRequest::Method::Post);
}
RefreshDeviceTunnelSharePasswordRequest::~RefreshDeviceTunnelSharePasswordRequest()
{}
std::string RefreshDeviceTunnelSharePasswordRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void RefreshDeviceTunnelSharePasswordRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string RefreshDeviceTunnelSharePasswordRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void RefreshDeviceTunnelSharePasswordRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string RefreshDeviceTunnelSharePasswordRequest::getProductKey()const
{
return productKey_;
}
void RefreshDeviceTunnelSharePasswordRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string RefreshDeviceTunnelSharePasswordRequest::getApiProduct()const
{
return apiProduct_;
}
void RefreshDeviceTunnelSharePasswordRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string RefreshDeviceTunnelSharePasswordRequest::getApiRevision()const
{
return apiRevision_;
}
void RefreshDeviceTunnelSharePasswordRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string RefreshDeviceTunnelSharePasswordRequest::getDeviceName()const
{
return deviceName_;
}
void RefreshDeviceTunnelSharePasswordRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View 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/iot/model/RefreshDeviceTunnelSharePasswordResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
RefreshDeviceTunnelSharePasswordResult::RefreshDeviceTunnelSharePasswordResult() :
ServiceResult()
{}
RefreshDeviceTunnelSharePasswordResult::RefreshDeviceTunnelSharePasswordResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RefreshDeviceTunnelSharePasswordResult::~RefreshDeviceTunnelSharePasswordResult()
{}
void RefreshDeviceTunnelSharePasswordResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Password"].isNull())
password_ = value["Password"].asString();
}
std::string RefreshDeviceTunnelSharePasswordResult::getErrorMessage()const
{
return errorMessage_;
}
std::string RefreshDeviceTunnelSharePasswordResult::getCode()const
{
return code_;
}
bool RefreshDeviceTunnelSharePasswordResult::getSuccess()const
{
return success_;
}
std::string RefreshDeviceTunnelSharePasswordResult::getPassword()const
{
return password_;
}

View File

@@ -0,0 +1,150 @@
/*
* 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/iot/model/ReleaseProductRequest.h>
using AlibabaCloud::Iot::Model::ReleaseProductRequest;
ReleaseProductRequest::ReleaseProductRequest() :
RpcServiceRequest("iot", "2018-01-20", "ReleaseProduct")
{
setMethod(HttpRequest::Method::Post);
}
ReleaseProductRequest::~ReleaseProductRequest()
{}
int ReleaseProductRequest::get_Template()const
{
return _template_;
}
void ReleaseProductRequest::set_Template(int _template)
{
_template_ = _template;
setParameter("_Template", std::to_string(_template));
}
std::string ReleaseProductRequest::getCategoryKey()const
{
return categoryKey_;
}
void ReleaseProductRequest::setCategoryKey(const std::string& categoryKey)
{
categoryKey_ = categoryKey;
setParameter("CategoryKey", categoryKey);
}
std::string ReleaseProductRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ReleaseProductRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string ReleaseProductRequest::getTemplateIdentifier()const
{
return templateIdentifier_;
}
void ReleaseProductRequest::setTemplateIdentifier(const std::string& templateIdentifier)
{
templateIdentifier_ = templateIdentifier;
setParameter("TemplateIdentifier", templateIdentifier);
}
std::string ReleaseProductRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void ReleaseProductRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string ReleaseProductRequest::getTemplateName()const
{
return templateName_;
}
void ReleaseProductRequest::setTemplateName(const std::string& templateName)
{
templateName_ = templateName;
setParameter("TemplateName", templateName);
}
std::string ReleaseProductRequest::getProductKey()const
{
return productKey_;
}
void ReleaseProductRequest::setProductKey(const std::string& productKey)
{
productKey_ = productKey;
setParameter("ProductKey", productKey);
}
std::string ReleaseProductRequest::getApiProduct()const
{
return apiProduct_;
}
void ReleaseProductRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string ReleaseProductRequest::getApiRevision()const
{
return apiRevision_;
}
void ReleaseProductRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
std::string ReleaseProductRequest::getCategoryName()const
{
return categoryName_;
}
void ReleaseProductRequest::setCategoryName(const std::string& categoryName)
{
categoryName_ = categoryName;
setParameter("CategoryName", categoryName);
}
std::string ReleaseProductRequest::getBizTenantId()const
{
return bizTenantId_;
}
void ReleaseProductRequest::setBizTenantId(const std::string& bizTenantId)
{
bizTenantId_ = bizTenantId;
setParameter("BizTenantId", bizTenantId);
}

View 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/iot/model/ReleaseProductResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
ReleaseProductResult::ReleaseProductResult() :
ServiceResult()
{}
ReleaseProductResult::ReleaseProductResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ReleaseProductResult::~ReleaseProductResult()
{}
void ReleaseProductResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string ReleaseProductResult::getErrorMessage()const
{
return errorMessage_;
}
std::string ReleaseProductResult::getCode()const
{
return code_;
}
bool ReleaseProductResult::getSuccess()const
{
return success_;
}

View File

@@ -44,6 +44,14 @@ void SyncSpeechByCombinationResult::parse(const std::string &payload)
data_.id = dataNode["Id"].asString();
if(!dataNode["RetryCount"].isNull())
data_.retryCount = std::stoi(dataNode["RetryCount"].asString());
if(!dataNode["Success"].isNull())
data_.success = dataNode["Success"].asString() == "true";
if(!dataNode["MaxRetryCount"].isNull())
data_.maxRetryCount = std::stoi(dataNode["MaxRetryCount"].asString());
if(!dataNode["DeviceErrorCode"].isNull())
data_.deviceErrorCode = dataNode["DeviceErrorCode"].asString();
if(!dataNode["DeviceErrorMessage"].isNull())
data_.deviceErrorMessage = dataNode["DeviceErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())

View 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/iot/model/UpdateEdgeInstanceMessageRoutingRequest.h>
using AlibabaCloud::Iot::Model::UpdateEdgeInstanceMessageRoutingRequest;
UpdateEdgeInstanceMessageRoutingRequest::UpdateEdgeInstanceMessageRoutingRequest() :
RpcServiceRequest("iot", "2018-01-20", "UpdateEdgeInstanceMessageRouting")
{
setMethod(HttpRequest::Method::Post);
}
UpdateEdgeInstanceMessageRoutingRequest::~UpdateEdgeInstanceMessageRoutingRequest()
{}
std::string UpdateEdgeInstanceMessageRoutingRequest::getSourceData()const
{
return sourceData_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setSourceData(const std::string& sourceData)
{
sourceData_ = sourceData;
setParameter("SourceData", sourceData);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getTargetType()const
{
return targetType_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setTargetType(const std::string& targetType)
{
targetType_ = targetType;
setParameter("TargetType", targetType);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getIotInstanceId()const
{
return iotInstanceId_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setIotInstanceId(const std::string& iotInstanceId)
{
iotInstanceId_ = iotInstanceId;
setParameter("IotInstanceId", iotInstanceId);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getSourceType()const
{
return sourceType_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setSourceType(const std::string& sourceType)
{
sourceType_ = sourceType;
setParameter("SourceType", sourceType);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getTopicFilter()const
{
return topicFilter_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setTopicFilter(const std::string& topicFilter)
{
topicFilter_ = topicFilter;
setParameter("TopicFilter", topicFilter);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getInstanceId()const
{
return instanceId_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setParameter("InstanceId", instanceId);
}
long UpdateEdgeInstanceMessageRoutingRequest::getRouteId()const
{
return routeId_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setRouteId(long routeId)
{
routeId_ = routeId;
setParameter("RouteId", std::to_string(routeId));
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getTargetData()const
{
return targetData_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setTargetData(const std::string& targetData)
{
targetData_ = targetData;
setParameter("TargetData", targetData);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getApiProduct()const
{
return apiProduct_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setApiProduct(const std::string& apiProduct)
{
apiProduct_ = apiProduct;
setBodyParameter("ApiProduct", apiProduct);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getName()const
{
return name_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setName(const std::string& name)
{
name_ = name;
setParameter("Name", name);
}
std::string UpdateEdgeInstanceMessageRoutingRequest::getApiRevision()const
{
return apiRevision_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setApiRevision(const std::string& apiRevision)
{
apiRevision_ = apiRevision;
setBodyParameter("ApiRevision", apiRevision);
}
int UpdateEdgeInstanceMessageRoutingRequest::getTargetIotHubQos()const
{
return targetIotHubQos_;
}
void UpdateEdgeInstanceMessageRoutingRequest::setTargetIotHubQos(int targetIotHubQos)
{
targetIotHubQos_ = targetIotHubQos;
setParameter("TargetIotHubQos", std::to_string(targetIotHubQos));
}

View 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/iot/model/UpdateEdgeInstanceMessageRoutingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Iot;
using namespace AlibabaCloud::Iot::Model;
UpdateEdgeInstanceMessageRoutingResult::UpdateEdgeInstanceMessageRoutingResult() :
ServiceResult()
{}
UpdateEdgeInstanceMessageRoutingResult::UpdateEdgeInstanceMessageRoutingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateEdgeInstanceMessageRoutingResult::~UpdateEdgeInstanceMessageRoutingResult()
{}
void UpdateEdgeInstanceMessageRoutingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string UpdateEdgeInstanceMessageRoutingResult::getErrorMessage()const
{
return errorMessage_;
}
std::string UpdateEdgeInstanceMessageRoutingResult::getCode()const
{
return code_;
}
bool UpdateEdgeInstanceMessageRoutingResult::getSuccess()const
{
return success_;
}