Support device credential for mqtt.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-02-01 Version: patch
|
||||
- Support device credential for mqtt.
|
||||
|
||||
2021-02-01 Version: patch
|
||||
- Release GenerateHumanSketchStyle MergeImageFace AddFaceImageTemplate QueryFaceImageTemplate DeleteFaceImageTemplate.
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALREQUEST_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT GetDeviceCredentialRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetDeviceCredentialRequest();
|
||||
~GetDeviceCredentialRequest();
|
||||
|
||||
std::string getClientId()const;
|
||||
void setClientId(const std::string& clientId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
|
||||
private:
|
||||
std::string clientId_;
|
||||
std::string instanceId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALRESULT_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT GetDeviceCredentialResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DeviceCredential
|
||||
{
|
||||
std::string instanceId;
|
||||
std::string deviceAccessKeySecret;
|
||||
long createTime;
|
||||
std::string deviceAccessKeyId;
|
||||
long updateTime;
|
||||
std::string clientId;
|
||||
};
|
||||
|
||||
|
||||
GetDeviceCredentialResult();
|
||||
explicit GetDeviceCredentialResult(const std::string &payload);
|
||||
~GetDeviceCredentialResult();
|
||||
DeviceCredential getDeviceCredential()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
DeviceCredential deviceCredential_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_GETDEVICECREDENTIALRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALREQUEST_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT RefreshDeviceCredentialRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RefreshDeviceCredentialRequest();
|
||||
~RefreshDeviceCredentialRequest();
|
||||
|
||||
std::string getClientId()const;
|
||||
void setClientId(const std::string& clientId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
|
||||
private:
|
||||
std::string clientId_;
|
||||
std::string instanceId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALRESULT_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT RefreshDeviceCredentialResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DeviceCredential
|
||||
{
|
||||
std::string instanceId;
|
||||
std::string deviceAccessKeySecret;
|
||||
long createTime;
|
||||
std::string deviceAccessKeyId;
|
||||
long updateTime;
|
||||
std::string clientId;
|
||||
};
|
||||
|
||||
|
||||
RefreshDeviceCredentialResult();
|
||||
explicit RefreshDeviceCredentialResult(const std::string &payload);
|
||||
~RefreshDeviceCredentialResult();
|
||||
DeviceCredential getDeviceCredential()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
DeviceCredential deviceCredential_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REFRESHDEVICECREDENTIALRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALREQUEST_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT RegisterDeviceCredentialRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RegisterDeviceCredentialRequest();
|
||||
~RegisterDeviceCredentialRequest();
|
||||
|
||||
std::string getClientId()const;
|
||||
void setClientId(const std::string& clientId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
|
||||
private:
|
||||
std::string clientId_;
|
||||
std::string instanceId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALRESULT_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT RegisterDeviceCredentialResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DeviceCredential
|
||||
{
|
||||
std::string instanceId;
|
||||
std::string deviceAccessKeySecret;
|
||||
long createTime;
|
||||
std::string deviceAccessKeyId;
|
||||
long updateTime;
|
||||
std::string clientId;
|
||||
};
|
||||
|
||||
|
||||
RegisterDeviceCredentialResult();
|
||||
explicit RegisterDeviceCredentialResult(const std::string &payload);
|
||||
~RegisterDeviceCredentialResult();
|
||||
DeviceCredential getDeviceCredential()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
DeviceCredential deviceCredential_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_REGISTERDEVICECREDENTIALRESULT_H_
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALREQUEST_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT UnRegisterDeviceCredentialRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
UnRegisterDeviceCredentialRequest();
|
||||
~UnRegisterDeviceCredentialRequest();
|
||||
|
||||
std::string getClientId()const;
|
||||
void setClientId(const std::string& clientId);
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
|
||||
private:
|
||||
std::string clientId_;
|
||||
std::string instanceId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALRESULT_H_
|
||||
#define ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/onsmqtt/OnsMqttExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace OnsMqtt
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ONSMQTT_EXPORT UnRegisterDeviceCredentialResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UnRegisterDeviceCredentialResult();
|
||||
explicit UnRegisterDeviceCredentialResult(const std::string &payload);
|
||||
~UnRegisterDeviceCredentialResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ONSMQTT_MODEL_UNREGISTERDEVICECREDENTIALRESULT_H_
|
||||
51
onsmqtt/src/model/GetDeviceCredentialRequest.cc
Normal file
51
onsmqtt/src/model/GetDeviceCredentialRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/onsmqtt/model/GetDeviceCredentialRequest.h>
|
||||
|
||||
using AlibabaCloud::OnsMqtt::Model::GetDeviceCredentialRequest;
|
||||
|
||||
GetDeviceCredentialRequest::GetDeviceCredentialRequest() :
|
||||
RpcServiceRequest("onsmqtt", "2020-04-20", "GetDeviceCredential")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDeviceCredentialRequest::~GetDeviceCredentialRequest()
|
||||
{}
|
||||
|
||||
std::string GetDeviceCredentialRequest::getClientId()const
|
||||
{
|
||||
return clientId_;
|
||||
}
|
||||
|
||||
void GetDeviceCredentialRequest::setClientId(const std::string& clientId)
|
||||
{
|
||||
clientId_ = clientId;
|
||||
setParameter("ClientId", clientId);
|
||||
}
|
||||
|
||||
std::string GetDeviceCredentialRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
62
onsmqtt/src/model/GetDeviceCredentialResult.cc
Normal file
62
onsmqtt/src/model/GetDeviceCredentialResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/onsmqtt/model/GetDeviceCredentialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OnsMqtt;
|
||||
using namespace AlibabaCloud::OnsMqtt::Model;
|
||||
|
||||
GetDeviceCredentialResult::GetDeviceCredentialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDeviceCredentialResult::GetDeviceCredentialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDeviceCredentialResult::~GetDeviceCredentialResult()
|
||||
{}
|
||||
|
||||
void GetDeviceCredentialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto deviceCredentialNode = value["DeviceCredential"];
|
||||
if(!deviceCredentialNode["ClientId"].isNull())
|
||||
deviceCredential_.clientId = deviceCredentialNode["ClientId"].asString();
|
||||
if(!deviceCredentialNode["DeviceAccessKeyId"].isNull())
|
||||
deviceCredential_.deviceAccessKeyId = deviceCredentialNode["DeviceAccessKeyId"].asString();
|
||||
if(!deviceCredentialNode["DeviceAccessKeySecret"].isNull())
|
||||
deviceCredential_.deviceAccessKeySecret = deviceCredentialNode["DeviceAccessKeySecret"].asString();
|
||||
if(!deviceCredentialNode["InstanceId"].isNull())
|
||||
deviceCredential_.instanceId = deviceCredentialNode["InstanceId"].asString();
|
||||
if(!deviceCredentialNode["CreateTime"].isNull())
|
||||
deviceCredential_.createTime = std::stol(deviceCredentialNode["CreateTime"].asString());
|
||||
if(!deviceCredentialNode["UpdateTime"].isNull())
|
||||
deviceCredential_.updateTime = std::stol(deviceCredentialNode["UpdateTime"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetDeviceCredentialResult::DeviceCredential GetDeviceCredentialResult::getDeviceCredential()const
|
||||
{
|
||||
return deviceCredential_;
|
||||
}
|
||||
|
||||
51
onsmqtt/src/model/RefreshDeviceCredentialRequest.cc
Normal file
51
onsmqtt/src/model/RefreshDeviceCredentialRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/onsmqtt/model/RefreshDeviceCredentialRequest.h>
|
||||
|
||||
using AlibabaCloud::OnsMqtt::Model::RefreshDeviceCredentialRequest;
|
||||
|
||||
RefreshDeviceCredentialRequest::RefreshDeviceCredentialRequest() :
|
||||
RpcServiceRequest("onsmqtt", "2020-04-20", "RefreshDeviceCredential")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RefreshDeviceCredentialRequest::~RefreshDeviceCredentialRequest()
|
||||
{}
|
||||
|
||||
std::string RefreshDeviceCredentialRequest::getClientId()const
|
||||
{
|
||||
return clientId_;
|
||||
}
|
||||
|
||||
void RefreshDeviceCredentialRequest::setClientId(const std::string& clientId)
|
||||
{
|
||||
clientId_ = clientId;
|
||||
setParameter("ClientId", clientId);
|
||||
}
|
||||
|
||||
std::string RefreshDeviceCredentialRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RefreshDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
62
onsmqtt/src/model/RefreshDeviceCredentialResult.cc
Normal file
62
onsmqtt/src/model/RefreshDeviceCredentialResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/onsmqtt/model/RefreshDeviceCredentialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OnsMqtt;
|
||||
using namespace AlibabaCloud::OnsMqtt::Model;
|
||||
|
||||
RefreshDeviceCredentialResult::RefreshDeviceCredentialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RefreshDeviceCredentialResult::RefreshDeviceCredentialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RefreshDeviceCredentialResult::~RefreshDeviceCredentialResult()
|
||||
{}
|
||||
|
||||
void RefreshDeviceCredentialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto deviceCredentialNode = value["DeviceCredential"];
|
||||
if(!deviceCredentialNode["ClientId"].isNull())
|
||||
deviceCredential_.clientId = deviceCredentialNode["ClientId"].asString();
|
||||
if(!deviceCredentialNode["DeviceAccessKeyId"].isNull())
|
||||
deviceCredential_.deviceAccessKeyId = deviceCredentialNode["DeviceAccessKeyId"].asString();
|
||||
if(!deviceCredentialNode["DeviceAccessKeySecret"].isNull())
|
||||
deviceCredential_.deviceAccessKeySecret = deviceCredentialNode["DeviceAccessKeySecret"].asString();
|
||||
if(!deviceCredentialNode["InstanceId"].isNull())
|
||||
deviceCredential_.instanceId = deviceCredentialNode["InstanceId"].asString();
|
||||
if(!deviceCredentialNode["CreateTime"].isNull())
|
||||
deviceCredential_.createTime = std::stol(deviceCredentialNode["CreateTime"].asString());
|
||||
if(!deviceCredentialNode["UpdateTime"].isNull())
|
||||
deviceCredential_.updateTime = std::stol(deviceCredentialNode["UpdateTime"].asString());
|
||||
|
||||
}
|
||||
|
||||
RefreshDeviceCredentialResult::DeviceCredential RefreshDeviceCredentialResult::getDeviceCredential()const
|
||||
{
|
||||
return deviceCredential_;
|
||||
}
|
||||
|
||||
51
onsmqtt/src/model/RegisterDeviceCredentialRequest.cc
Normal file
51
onsmqtt/src/model/RegisterDeviceCredentialRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/onsmqtt/model/RegisterDeviceCredentialRequest.h>
|
||||
|
||||
using AlibabaCloud::OnsMqtt::Model::RegisterDeviceCredentialRequest;
|
||||
|
||||
RegisterDeviceCredentialRequest::RegisterDeviceCredentialRequest() :
|
||||
RpcServiceRequest("onsmqtt", "2020-04-20", "RegisterDeviceCredential")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RegisterDeviceCredentialRequest::~RegisterDeviceCredentialRequest()
|
||||
{}
|
||||
|
||||
std::string RegisterDeviceCredentialRequest::getClientId()const
|
||||
{
|
||||
return clientId_;
|
||||
}
|
||||
|
||||
void RegisterDeviceCredentialRequest::setClientId(const std::string& clientId)
|
||||
{
|
||||
clientId_ = clientId;
|
||||
setParameter("ClientId", clientId);
|
||||
}
|
||||
|
||||
std::string RegisterDeviceCredentialRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RegisterDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
62
onsmqtt/src/model/RegisterDeviceCredentialResult.cc
Normal file
62
onsmqtt/src/model/RegisterDeviceCredentialResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/onsmqtt/model/RegisterDeviceCredentialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OnsMqtt;
|
||||
using namespace AlibabaCloud::OnsMqtt::Model;
|
||||
|
||||
RegisterDeviceCredentialResult::RegisterDeviceCredentialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RegisterDeviceCredentialResult::RegisterDeviceCredentialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RegisterDeviceCredentialResult::~RegisterDeviceCredentialResult()
|
||||
{}
|
||||
|
||||
void RegisterDeviceCredentialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto deviceCredentialNode = value["DeviceCredential"];
|
||||
if(!deviceCredentialNode["ClientId"].isNull())
|
||||
deviceCredential_.clientId = deviceCredentialNode["ClientId"].asString();
|
||||
if(!deviceCredentialNode["DeviceAccessKeyId"].isNull())
|
||||
deviceCredential_.deviceAccessKeyId = deviceCredentialNode["DeviceAccessKeyId"].asString();
|
||||
if(!deviceCredentialNode["DeviceAccessKeySecret"].isNull())
|
||||
deviceCredential_.deviceAccessKeySecret = deviceCredentialNode["DeviceAccessKeySecret"].asString();
|
||||
if(!deviceCredentialNode["InstanceId"].isNull())
|
||||
deviceCredential_.instanceId = deviceCredentialNode["InstanceId"].asString();
|
||||
if(!deviceCredentialNode["CreateTime"].isNull())
|
||||
deviceCredential_.createTime = std::stol(deviceCredentialNode["CreateTime"].asString());
|
||||
if(!deviceCredentialNode["UpdateTime"].isNull())
|
||||
deviceCredential_.updateTime = std::stol(deviceCredentialNode["UpdateTime"].asString());
|
||||
|
||||
}
|
||||
|
||||
RegisterDeviceCredentialResult::DeviceCredential RegisterDeviceCredentialResult::getDeviceCredential()const
|
||||
{
|
||||
return deviceCredential_;
|
||||
}
|
||||
|
||||
51
onsmqtt/src/model/UnRegisterDeviceCredentialRequest.cc
Normal file
51
onsmqtt/src/model/UnRegisterDeviceCredentialRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/onsmqtt/model/UnRegisterDeviceCredentialRequest.h>
|
||||
|
||||
using AlibabaCloud::OnsMqtt::Model::UnRegisterDeviceCredentialRequest;
|
||||
|
||||
UnRegisterDeviceCredentialRequest::UnRegisterDeviceCredentialRequest() :
|
||||
RpcServiceRequest("onsmqtt", "2020-04-20", "UnRegisterDeviceCredential")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UnRegisterDeviceCredentialRequest::~UnRegisterDeviceCredentialRequest()
|
||||
{}
|
||||
|
||||
std::string UnRegisterDeviceCredentialRequest::getClientId()const
|
||||
{
|
||||
return clientId_;
|
||||
}
|
||||
|
||||
void UnRegisterDeviceCredentialRequest::setClientId(const std::string& clientId)
|
||||
{
|
||||
clientId_ = clientId;
|
||||
setParameter("ClientId", clientId);
|
||||
}
|
||||
|
||||
std::string UnRegisterDeviceCredentialRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void UnRegisterDeviceCredentialRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
44
onsmqtt/src/model/UnRegisterDeviceCredentialResult.cc
Normal file
44
onsmqtt/src/model/UnRegisterDeviceCredentialResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/onsmqtt/model/UnRegisterDeviceCredentialResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::OnsMqtt;
|
||||
using namespace AlibabaCloud::OnsMqtt::Model;
|
||||
|
||||
UnRegisterDeviceCredentialResult::UnRegisterDeviceCredentialResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UnRegisterDeviceCredentialResult::UnRegisterDeviceCredentialResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UnRegisterDeviceCredentialResult::~UnRegisterDeviceCredentialResult()
|
||||
{}
|
||||
|
||||
void UnRegisterDeviceCredentialResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user