MOPEN SDK Auto Released By everettli.ll,Version:1.20.4

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-08-01 00:50:16 +08:00
parent 076567c0c7
commit f6d7b208a9
47 changed files with 3183 additions and 2 deletions

122
mopen/CMakeLists.txt Normal file
View File

@@ -0,0 +1,122 @@
#
# 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.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(mopen_public_header
include/alibabacloud/mopen/MoPenClient.h
include/alibabacloud/mopen/MoPenExport.h )
set(mopen_public_header_model
include/alibabacloud/mopen/model/MopenCreateGroupRequest.h
include/alibabacloud/mopen/model/MopenCreateGroupResult.h
include/alibabacloud/mopen/model/MoPenQueryCanvasRequest.h
include/alibabacloud/mopen/model/MoPenQueryCanvasResult.h
include/alibabacloud/mopen/model/MoPenDeleteGroupMemberRequest.h
include/alibabacloud/mopen/model/MoPenDeleteGroupMemberResult.h
include/alibabacloud/mopen/model/MoPenDoRecognizeRequest.h
include/alibabacloud/mopen/model/MoPenDoRecognizeResult.h
include/alibabacloud/mopen/model/MoPenBindIsvRequest.h
include/alibabacloud/mopen/model/MoPenBindIsvResult.h
include/alibabacloud/mopen/model/MoPenAddGroupMemberRequest.h
include/alibabacloud/mopen/model/MoPenAddGroupMemberResult.h
include/alibabacloud/mopen/model/MoPenCreateDeviceRequest.h
include/alibabacloud/mopen/model/MoPenCreateDeviceResult.h
include/alibabacloud/mopen/model/MoPenSendMqttMessageRequest.h
include/alibabacloud/mopen/model/MoPenSendMqttMessageResult.h
include/alibabacloud/mopen/model/MoPenFindGroupRequest.h
include/alibabacloud/mopen/model/MoPenFindGroupResult.h
include/alibabacloud/mopen/model/MoPenDeleteGroupRequest.h
include/alibabacloud/mopen/model/MoPenDeleteGroupResult.h )
set(mopen_src
src/MoPenClient.cc
src/model/MopenCreateGroupRequest.cc
src/model/MopenCreateGroupResult.cc
src/model/MoPenQueryCanvasRequest.cc
src/model/MoPenQueryCanvasResult.cc
src/model/MoPenDeleteGroupMemberRequest.cc
src/model/MoPenDeleteGroupMemberResult.cc
src/model/MoPenDoRecognizeRequest.cc
src/model/MoPenDoRecognizeResult.cc
src/model/MoPenBindIsvRequest.cc
src/model/MoPenBindIsvResult.cc
src/model/MoPenAddGroupMemberRequest.cc
src/model/MoPenAddGroupMemberResult.cc
src/model/MoPenCreateDeviceRequest.cc
src/model/MoPenCreateDeviceResult.cc
src/model/MoPenSendMqttMessageRequest.cc
src/model/MoPenSendMqttMessageResult.cc
src/model/MoPenFindGroupRequest.cc
src/model/MoPenFindGroupResult.cc
src/model/MoPenDeleteGroupRequest.cc
src/model/MoPenDeleteGroupResult.cc )
add_library(mopen ${LIB_TYPE}
${mopen_public_header}
${mopen_public_header_model}
${mopen_src})
set_target_properties(mopen
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}mopen
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(mopen
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_MOPEN_LIBRARY)
endif()
target_include_directories(mopen
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(mopen
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(mopen
jsoncpp)
target_include_directories(mopen
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(mopen
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(mopen
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(mopen
PRIVATE /usr/include/jsoncpp)
target_link_libraries(mopen
jsoncpp)
endif()
install(FILES ${mopen_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/mopen)
install(FILES ${mopen_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/mopen/model)
install(TARGETS mopen
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,126 @@
/*
* 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_MOPEN_MOPENCLIENT_H_
#define ALIBABACLOUD_MOPEN_MOPENCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "MoPenExport.h"
#include "model/MopenCreateGroupRequest.h"
#include "model/MopenCreateGroupResult.h"
#include "model/MoPenQueryCanvasRequest.h"
#include "model/MoPenQueryCanvasResult.h"
#include "model/MoPenDeleteGroupMemberRequest.h"
#include "model/MoPenDeleteGroupMemberResult.h"
#include "model/MoPenDoRecognizeRequest.h"
#include "model/MoPenDoRecognizeResult.h"
#include "model/MoPenBindIsvRequest.h"
#include "model/MoPenBindIsvResult.h"
#include "model/MoPenAddGroupMemberRequest.h"
#include "model/MoPenAddGroupMemberResult.h"
#include "model/MoPenCreateDeviceRequest.h"
#include "model/MoPenCreateDeviceResult.h"
#include "model/MoPenSendMqttMessageRequest.h"
#include "model/MoPenSendMqttMessageResult.h"
#include "model/MoPenFindGroupRequest.h"
#include "model/MoPenFindGroupResult.h"
#include "model/MoPenDeleteGroupRequest.h"
#include "model/MoPenDeleteGroupResult.h"
namespace AlibabaCloud
{
namespace MoPen
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::MopenCreateGroupResult> MopenCreateGroupOutcome;
typedef std::future<MopenCreateGroupOutcome> MopenCreateGroupOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MopenCreateGroupRequest&, const MopenCreateGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MopenCreateGroupAsyncHandler;
typedef Outcome<Error, Model::MoPenQueryCanvasResult> MoPenQueryCanvasOutcome;
typedef std::future<MoPenQueryCanvasOutcome> MoPenQueryCanvasOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenQueryCanvasRequest&, const MoPenQueryCanvasOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenQueryCanvasAsyncHandler;
typedef Outcome<Error, Model::MoPenDeleteGroupMemberResult> MoPenDeleteGroupMemberOutcome;
typedef std::future<MoPenDeleteGroupMemberOutcome> MoPenDeleteGroupMemberOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenDeleteGroupMemberRequest&, const MoPenDeleteGroupMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenDeleteGroupMemberAsyncHandler;
typedef Outcome<Error, Model::MoPenDoRecognizeResult> MoPenDoRecognizeOutcome;
typedef std::future<MoPenDoRecognizeOutcome> MoPenDoRecognizeOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenDoRecognizeRequest&, const MoPenDoRecognizeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenDoRecognizeAsyncHandler;
typedef Outcome<Error, Model::MoPenBindIsvResult> MoPenBindIsvOutcome;
typedef std::future<MoPenBindIsvOutcome> MoPenBindIsvOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenBindIsvRequest&, const MoPenBindIsvOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenBindIsvAsyncHandler;
typedef Outcome<Error, Model::MoPenAddGroupMemberResult> MoPenAddGroupMemberOutcome;
typedef std::future<MoPenAddGroupMemberOutcome> MoPenAddGroupMemberOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenAddGroupMemberRequest&, const MoPenAddGroupMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenAddGroupMemberAsyncHandler;
typedef Outcome<Error, Model::MoPenCreateDeviceResult> MoPenCreateDeviceOutcome;
typedef std::future<MoPenCreateDeviceOutcome> MoPenCreateDeviceOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenCreateDeviceRequest&, const MoPenCreateDeviceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenCreateDeviceAsyncHandler;
typedef Outcome<Error, Model::MoPenSendMqttMessageResult> MoPenSendMqttMessageOutcome;
typedef std::future<MoPenSendMqttMessageOutcome> MoPenSendMqttMessageOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenSendMqttMessageRequest&, const MoPenSendMqttMessageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenSendMqttMessageAsyncHandler;
typedef Outcome<Error, Model::MoPenFindGroupResult> MoPenFindGroupOutcome;
typedef std::future<MoPenFindGroupOutcome> MoPenFindGroupOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenFindGroupRequest&, const MoPenFindGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenFindGroupAsyncHandler;
typedef Outcome<Error, Model::MoPenDeleteGroupResult> MoPenDeleteGroupOutcome;
typedef std::future<MoPenDeleteGroupOutcome> MoPenDeleteGroupOutcomeCallable;
typedef std::function<void(const MoPenClient*, const Model::MoPenDeleteGroupRequest&, const MoPenDeleteGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MoPenDeleteGroupAsyncHandler;
MoPenClient(const Credentials &credentials, const ClientConfiguration &configuration);
MoPenClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
MoPenClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~MoPenClient();
MopenCreateGroupOutcome mopenCreateGroup(const Model::MopenCreateGroupRequest &request)const;
void mopenCreateGroupAsync(const Model::MopenCreateGroupRequest& request, const MopenCreateGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MopenCreateGroupOutcomeCallable mopenCreateGroupCallable(const Model::MopenCreateGroupRequest& request) const;
MoPenQueryCanvasOutcome moPenQueryCanvas(const Model::MoPenQueryCanvasRequest &request)const;
void moPenQueryCanvasAsync(const Model::MoPenQueryCanvasRequest& request, const MoPenQueryCanvasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenQueryCanvasOutcomeCallable moPenQueryCanvasCallable(const Model::MoPenQueryCanvasRequest& request) const;
MoPenDeleteGroupMemberOutcome moPenDeleteGroupMember(const Model::MoPenDeleteGroupMemberRequest &request)const;
void moPenDeleteGroupMemberAsync(const Model::MoPenDeleteGroupMemberRequest& request, const MoPenDeleteGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenDeleteGroupMemberOutcomeCallable moPenDeleteGroupMemberCallable(const Model::MoPenDeleteGroupMemberRequest& request) const;
MoPenDoRecognizeOutcome moPenDoRecognize(const Model::MoPenDoRecognizeRequest &request)const;
void moPenDoRecognizeAsync(const Model::MoPenDoRecognizeRequest& request, const MoPenDoRecognizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenDoRecognizeOutcomeCallable moPenDoRecognizeCallable(const Model::MoPenDoRecognizeRequest& request) const;
MoPenBindIsvOutcome moPenBindIsv(const Model::MoPenBindIsvRequest &request)const;
void moPenBindIsvAsync(const Model::MoPenBindIsvRequest& request, const MoPenBindIsvAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenBindIsvOutcomeCallable moPenBindIsvCallable(const Model::MoPenBindIsvRequest& request) const;
MoPenAddGroupMemberOutcome moPenAddGroupMember(const Model::MoPenAddGroupMemberRequest &request)const;
void moPenAddGroupMemberAsync(const Model::MoPenAddGroupMemberRequest& request, const MoPenAddGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenAddGroupMemberOutcomeCallable moPenAddGroupMemberCallable(const Model::MoPenAddGroupMemberRequest& request) const;
MoPenCreateDeviceOutcome moPenCreateDevice(const Model::MoPenCreateDeviceRequest &request)const;
void moPenCreateDeviceAsync(const Model::MoPenCreateDeviceRequest& request, const MoPenCreateDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenCreateDeviceOutcomeCallable moPenCreateDeviceCallable(const Model::MoPenCreateDeviceRequest& request) const;
MoPenSendMqttMessageOutcome moPenSendMqttMessage(const Model::MoPenSendMqttMessageRequest &request)const;
void moPenSendMqttMessageAsync(const Model::MoPenSendMqttMessageRequest& request, const MoPenSendMqttMessageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenSendMqttMessageOutcomeCallable moPenSendMqttMessageCallable(const Model::MoPenSendMqttMessageRequest& request) const;
MoPenFindGroupOutcome moPenFindGroup(const Model::MoPenFindGroupRequest &request)const;
void moPenFindGroupAsync(const Model::MoPenFindGroupRequest& request, const MoPenFindGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenFindGroupOutcomeCallable moPenFindGroupCallable(const Model::MoPenFindGroupRequest& request) const;
MoPenDeleteGroupOutcome moPenDeleteGroup(const Model::MoPenDeleteGroupRequest &request)const;
void moPenDeleteGroupAsync(const Model::MoPenDeleteGroupRequest& request, const MoPenDeleteGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MoPenDeleteGroupOutcomeCallable moPenDeleteGroupCallable(const Model::MoPenDeleteGroupRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_MOPEN_MOPENCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* 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_MOPEN_MOPENEXPORT_H_
#define ALIBABACLOUD_MOPEN_MOPENEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_MOPEN_LIBRARY)
# define ALIBABACLOUD_MOPEN_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_MOPEN_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_MOPEN_EXPORT
#endif
#endif // !ALIBABACLOUD_MOPEN_MOPENEXPORT_H_

View 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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenAddGroupMemberRequest : public RpcServiceRequest
{
public:
MoPenAddGroupMemberRequest();
~MoPenAddGroupMemberRequest();
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string groupId_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENADDGROUPMEMBERRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenAddGroupMemberResult : public ServiceResult
{
public:
MoPenAddGroupMemberResult();
explicit MoPenAddGroupMemberResult(const std::string &payload);
~MoPenAddGroupMemberResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENADDGROUPMEMBERRESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenBindIsvRequest : public RpcServiceRequest
{
public:
MoPenBindIsvRequest();
~MoPenBindIsvRequest();
std::string getOrderKey()const;
void setOrderKey(const std::string& orderKey);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string orderKey_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENBINDISVRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenBindIsvResult : public ServiceResult
{
public:
MoPenBindIsvResult();
explicit MoPenBindIsvResult(const std::string &payload);
~MoPenBindIsvResult();
std::string getDescription()const;
std::string getMessage()const;
bool getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
bool code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENBINDISVRESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICEREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenCreateDeviceRequest : public RpcServiceRequest
{
public:
MoPenCreateDeviceRequest();
~MoPenCreateDeviceRequest();
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
int getDeviceType()const;
void setDeviceType(int deviceType);
private:
std::string deviceName_;
int deviceType_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICEREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICERESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenCreateDeviceResult : public ServiceResult
{
public:
struct Data
{
std::string deviceSecret;
std::string product;
std::string deviceName;
};
MoPenCreateDeviceResult();
explicit MoPenCreateDeviceResult(const std::string &payload);
~MoPenCreateDeviceResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
bool getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
bool code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEDEVICERESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupMemberRequest : public RpcServiceRequest
{
public:
MoPenDeleteGroupMemberRequest();
~MoPenDeleteGroupMemberRequest();
long getGroupId()const;
void setGroupId(long groupId);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
long groupId_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENDELETEGROUPMEMBERRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupMemberResult : public ServiceResult
{
public:
MoPenDeleteGroupMemberResult();
explicit MoPenDeleteGroupMemberResult(const std::string &payload);
~MoPenDeleteGroupMemberResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPMEMBERRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* 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_MOPEN_MODEL_MOPENDELETEGROUPREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupRequest : public RpcServiceRequest
{
public:
MoPenDeleteGroupRequest();
~MoPenDeleteGroupRequest();
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
private:
std::string groupId_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENDELETEGROUPRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDeleteGroupResult : public ServiceResult
{
public:
MoPenDeleteGroupResult();
explicit MoPenDeleteGroupResult(const std::string &payload);
~MoPenDeleteGroupResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDELETEGROUPRESULT_H_

View File

@@ -0,0 +1,66 @@
/*
* 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_MOPEN_MODEL_MOPENDORECOGNIZEREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDoRecognizeRequest : public RpcServiceRequest
{
public:
MoPenDoRecognizeRequest();
~MoPenDoRecognizeRequest();
long getCanvasId()const;
void setCanvasId(long canvasId);
int getEndY()const;
void setEndY(int endY);
int getEndX()const;
void setEndX(int endX);
std::string getJsonConf()const;
void setJsonConf(const std::string& jsonConf);
std::string getExportType()const;
void setExportType(const std::string& exportType);
int getStartY()const;
void setStartY(int startY);
int getStartX()const;
void setStartX(int startX);
private:
long canvasId_;
int endY_;
int endX_;
std::string jsonConf_;
std::string exportType_;
int startY_;
int startX_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZEREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZERESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenDoRecognizeResult : public ServiceResult
{
public:
struct Data
{
std::string resultType;
std::string result;
long canvasId;
};
MoPenDoRecognizeResult();
explicit MoPenDoRecognizeResult(const std::string &payload);
~MoPenDoRecognizeResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENDORECOGNIZERESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* 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_MOPEN_MODEL_MOPENFINDGROUPREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenFindGroupRequest : public RpcServiceRequest
{
public:
MoPenFindGroupRequest();
~MoPenFindGroupRequest();
std::string getCreator()const;
void setCreator(const std::string& creator);
private:
std::string creator_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPREQUEST_H_

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenFindGroupResult : public ServiceResult
{
public:
struct Data
{
std::string creator;
std::string groupId;
};
MoPenFindGroupResult();
explicit MoPenFindGroupResult(const std::string &payload);
~MoPenFindGroupResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
int getCode()const;
std::string getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
int code_;
std::string success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENFINDGROUPRESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENQUERYCANVASREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenQueryCanvasRequest : public RpcServiceRequest
{
public:
MoPenQueryCanvasRequest();
~MoPenQueryCanvasRequest();
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
std::string getSessionId()const;
void setSessionId(const std::string& sessionId);
int getPageId()const;
void setPageId(int pageId);
int getStatus()const;
void setStatus(int status);
private:
std::string deviceName_;
std::string sessionId_;
int pageId_;
int status_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenQueryCanvasResult : public ServiceResult
{
public:
struct Data
{
struct Canvas
{
int pageId;
std::string lastModified;
int status;
std::string attribute;
std::string createTime;
long id;
std::string sessionId;
std::string url;
std::string deviceName;
};
std::vector<Canvas> canvasList;
};
MoPenQueryCanvasResult();
explicit MoPenQueryCanvasResult(const std::string &payload);
~MoPenQueryCanvasResult();
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
Data data_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENQUERYCANVASRESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGEREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenSendMqttMessageRequest : public RpcServiceRequest
{
public:
MoPenSendMqttMessageRequest();
~MoPenSendMqttMessageRequest();
std::string getPayload()const;
void setPayload(const std::string& payload);
std::string getDeviceName()const;
void setDeviceName(const std::string& deviceName);
private:
std::string payload_;
std::string deviceName_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGEREQUEST_H_

View File

@@ -0,0 +1,57 @@
/*
* 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_MOPEN_MODEL_MOPENSENDMQTTMESSAGERESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MoPenSendMqttMessageResult : public ServiceResult
{
public:
MoPenSendMqttMessageResult();
explicit MoPenSendMqttMessageResult(const std::string &payload);
~MoPenSendMqttMessageResult();
std::string getDescription()const;
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string description_;
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENSENDMQTTMESSAGERESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* 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_MOPEN_MODEL_MOPENCREATEGROUPREQUEST_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MopenCreateGroupRequest : public RpcServiceRequest
{
public:
MopenCreateGroupRequest();
~MopenCreateGroupRequest();
std::string getCreator()const;
void setCreator(const std::string& creator);
private:
std::string creator_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPRESULT_H_
#define ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/mopen/MoPenExport.h>
namespace AlibabaCloud
{
namespace MoPen
{
namespace Model
{
class ALIBABACLOUD_MOPEN_EXPORT MopenCreateGroupResult : public ServiceResult
{
public:
struct Data
{
std::string groupId;
};
MopenCreateGroupResult();
explicit MopenCreateGroupResult(const std::string &payload);
~MopenCreateGroupResult();
std::string getResqusetId()const;
std::string getDescription()const;
std::string getMessage()const;
Data getData()const;
int getCode()const;
std::string getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string resqusetId_;
std::string description_;
std::string message_;
Data data_;
int code_;
std::string success_;
};
}
}
}
#endif // !ALIBABACLOUD_MOPEN_MODEL_MOPENCREATEGROUPRESULT_H_

413
mopen/src/MoPenClient.cc Normal file
View File

@@ -0,0 +1,413 @@
/*
* 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/mopen/MoPenClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
namespace
{
const std::string SERVICE_NAME = "MoPen";
}
MoPenClient::MoPenClient(const Credentials &credentials, const ClientConfiguration &configuration) :
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, "");
}
MoPenClient::MoPenClient(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, "");
}
MoPenClient::MoPenClient(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, "");
}
MoPenClient::~MoPenClient()
{}
MoPenClient::MopenCreateGroupOutcome MoPenClient::mopenCreateGroup(const MopenCreateGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MopenCreateGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MopenCreateGroupOutcome(MopenCreateGroupResult(outcome.result()));
else
return MopenCreateGroupOutcome(outcome.error());
}
void MoPenClient::mopenCreateGroupAsync(const MopenCreateGroupRequest& request, const MopenCreateGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, mopenCreateGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MopenCreateGroupOutcomeCallable MoPenClient::mopenCreateGroupCallable(const MopenCreateGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MopenCreateGroupOutcome()>>(
[this, request]()
{
return this->mopenCreateGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenQueryCanvasOutcome MoPenClient::moPenQueryCanvas(const MoPenQueryCanvasRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenQueryCanvasOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenQueryCanvasOutcome(MoPenQueryCanvasResult(outcome.result()));
else
return MoPenQueryCanvasOutcome(outcome.error());
}
void MoPenClient::moPenQueryCanvasAsync(const MoPenQueryCanvasRequest& request, const MoPenQueryCanvasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenQueryCanvas(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenQueryCanvasOutcomeCallable MoPenClient::moPenQueryCanvasCallable(const MoPenQueryCanvasRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenQueryCanvasOutcome()>>(
[this, request]()
{
return this->moPenQueryCanvas(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenDeleteGroupMemberOutcome MoPenClient::moPenDeleteGroupMember(const MoPenDeleteGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenDeleteGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenDeleteGroupMemberOutcome(MoPenDeleteGroupMemberResult(outcome.result()));
else
return MoPenDeleteGroupMemberOutcome(outcome.error());
}
void MoPenClient::moPenDeleteGroupMemberAsync(const MoPenDeleteGroupMemberRequest& request, const MoPenDeleteGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenDeleteGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenDeleteGroupMemberOutcomeCallable MoPenClient::moPenDeleteGroupMemberCallable(const MoPenDeleteGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenDeleteGroupMemberOutcome()>>(
[this, request]()
{
return this->moPenDeleteGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenDoRecognizeOutcome MoPenClient::moPenDoRecognize(const MoPenDoRecognizeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenDoRecognizeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenDoRecognizeOutcome(MoPenDoRecognizeResult(outcome.result()));
else
return MoPenDoRecognizeOutcome(outcome.error());
}
void MoPenClient::moPenDoRecognizeAsync(const MoPenDoRecognizeRequest& request, const MoPenDoRecognizeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenDoRecognize(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenDoRecognizeOutcomeCallable MoPenClient::moPenDoRecognizeCallable(const MoPenDoRecognizeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenDoRecognizeOutcome()>>(
[this, request]()
{
return this->moPenDoRecognize(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenBindIsvOutcome MoPenClient::moPenBindIsv(const MoPenBindIsvRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenBindIsvOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenBindIsvOutcome(MoPenBindIsvResult(outcome.result()));
else
return MoPenBindIsvOutcome(outcome.error());
}
void MoPenClient::moPenBindIsvAsync(const MoPenBindIsvRequest& request, const MoPenBindIsvAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenBindIsv(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenBindIsvOutcomeCallable MoPenClient::moPenBindIsvCallable(const MoPenBindIsvRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenBindIsvOutcome()>>(
[this, request]()
{
return this->moPenBindIsv(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenAddGroupMemberOutcome MoPenClient::moPenAddGroupMember(const MoPenAddGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenAddGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenAddGroupMemberOutcome(MoPenAddGroupMemberResult(outcome.result()));
else
return MoPenAddGroupMemberOutcome(outcome.error());
}
void MoPenClient::moPenAddGroupMemberAsync(const MoPenAddGroupMemberRequest& request, const MoPenAddGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenAddGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenAddGroupMemberOutcomeCallable MoPenClient::moPenAddGroupMemberCallable(const MoPenAddGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenAddGroupMemberOutcome()>>(
[this, request]()
{
return this->moPenAddGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenCreateDeviceOutcome MoPenClient::moPenCreateDevice(const MoPenCreateDeviceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenCreateDeviceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenCreateDeviceOutcome(MoPenCreateDeviceResult(outcome.result()));
else
return MoPenCreateDeviceOutcome(outcome.error());
}
void MoPenClient::moPenCreateDeviceAsync(const MoPenCreateDeviceRequest& request, const MoPenCreateDeviceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenCreateDevice(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenCreateDeviceOutcomeCallable MoPenClient::moPenCreateDeviceCallable(const MoPenCreateDeviceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenCreateDeviceOutcome()>>(
[this, request]()
{
return this->moPenCreateDevice(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenSendMqttMessageOutcome MoPenClient::moPenSendMqttMessage(const MoPenSendMqttMessageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenSendMqttMessageOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenSendMqttMessageOutcome(MoPenSendMqttMessageResult(outcome.result()));
else
return MoPenSendMqttMessageOutcome(outcome.error());
}
void MoPenClient::moPenSendMqttMessageAsync(const MoPenSendMqttMessageRequest& request, const MoPenSendMqttMessageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenSendMqttMessage(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenSendMqttMessageOutcomeCallable MoPenClient::moPenSendMqttMessageCallable(const MoPenSendMqttMessageRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenSendMqttMessageOutcome()>>(
[this, request]()
{
return this->moPenSendMqttMessage(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenFindGroupOutcome MoPenClient::moPenFindGroup(const MoPenFindGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenFindGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenFindGroupOutcome(MoPenFindGroupResult(outcome.result()));
else
return MoPenFindGroupOutcome(outcome.error());
}
void MoPenClient::moPenFindGroupAsync(const MoPenFindGroupRequest& request, const MoPenFindGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenFindGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenFindGroupOutcomeCallable MoPenClient::moPenFindGroupCallable(const MoPenFindGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenFindGroupOutcome()>>(
[this, request]()
{
return this->moPenFindGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
MoPenClient::MoPenDeleteGroupOutcome MoPenClient::moPenDeleteGroup(const MoPenDeleteGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return MoPenDeleteGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return MoPenDeleteGroupOutcome(MoPenDeleteGroupResult(outcome.result()));
else
return MoPenDeleteGroupOutcome(outcome.error());
}
void MoPenClient::moPenDeleteGroupAsync(const MoPenDeleteGroupRequest& request, const MoPenDeleteGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, moPenDeleteGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
MoPenClient::MoPenDeleteGroupOutcomeCallable MoPenClient::moPenDeleteGroupCallable(const MoPenDeleteGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<MoPenDeleteGroupOutcome()>>(
[this, request]()
{
return this->moPenDeleteGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenAddGroupMemberRequest.h>
using AlibabaCloud::MoPen::Model::MoPenAddGroupMemberRequest;
MoPenAddGroupMemberRequest::MoPenAddGroupMemberRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenAddGroupMember")
{}
MoPenAddGroupMemberRequest::~MoPenAddGroupMemberRequest()
{}
std::string MoPenAddGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void MoPenAddGroupMemberRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}
std::string MoPenAddGroupMemberRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenAddGroupMemberRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenAddGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenAddGroupMemberResult::MoPenAddGroupMemberResult() :
ServiceResult()
{}
MoPenAddGroupMemberResult::MoPenAddGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenAddGroupMemberResult::~MoPenAddGroupMemberResult()
{}
void MoPenAddGroupMemberResult::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["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string MoPenAddGroupMemberResult::getDescription()const
{
return description_;
}
std::string MoPenAddGroupMemberResult::getMessage()const
{
return message_;
}
std::string MoPenAddGroupMemberResult::getCode()const
{
return code_;
}
bool MoPenAddGroupMemberResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenBindIsvRequest.h>
using AlibabaCloud::MoPen::Model::MoPenBindIsvRequest;
MoPenBindIsvRequest::MoPenBindIsvRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenBindIsv")
{}
MoPenBindIsvRequest::~MoPenBindIsvRequest()
{}
std::string MoPenBindIsvRequest::getOrderKey()const
{
return orderKey_;
}
void MoPenBindIsvRequest::setOrderKey(const std::string& orderKey)
{
orderKey_ = orderKey;
setParameter("OrderKey", orderKey);
}
std::string MoPenBindIsvRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenBindIsvRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenBindIsvResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenBindIsvResult::MoPenBindIsvResult() :
ServiceResult()
{}
MoPenBindIsvResult::MoPenBindIsvResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenBindIsvResult::~MoPenBindIsvResult()
{}
void MoPenBindIsvResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenBindIsvResult::getDescription()const
{
return description_;
}
std::string MoPenBindIsvResult::getMessage()const
{
return message_;
}
bool MoPenBindIsvResult::getCode()const
{
return code_;
}
bool MoPenBindIsvResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenCreateDeviceRequest.h>
using AlibabaCloud::MoPen::Model::MoPenCreateDeviceRequest;
MoPenCreateDeviceRequest::MoPenCreateDeviceRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenCreateDevice")
{}
MoPenCreateDeviceRequest::~MoPenCreateDeviceRequest()
{}
std::string MoPenCreateDeviceRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenCreateDeviceRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
int MoPenCreateDeviceRequest::getDeviceType()const
{
return deviceType_;
}
void MoPenCreateDeviceRequest::setDeviceType(int deviceType)
{
deviceType_ = deviceType;
setParameter("DeviceType", std::to_string(deviceType));
}

View File

@@ -0,0 +1,85 @@
/*
* 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/mopen/model/MoPenCreateDeviceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenCreateDeviceResult::MoPenCreateDeviceResult() :
ServiceResult()
{}
MoPenCreateDeviceResult::MoPenCreateDeviceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenCreateDeviceResult::~MoPenCreateDeviceResult()
{}
void MoPenCreateDeviceResult::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["DeviceName"].isNull())
data_.deviceName = dataNode["DeviceName"].asString();
if(!dataNode["Product"].isNull())
data_.product = dataNode["Product"].asString();
if(!dataNode["DeviceSecret"].isNull())
data_.deviceSecret = dataNode["DeviceSecret"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString() == "true";
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenCreateDeviceResult::getDescription()const
{
return description_;
}
std::string MoPenCreateDeviceResult::getMessage()const
{
return message_;
}
MoPenCreateDeviceResult::Data MoPenCreateDeviceResult::getData()const
{
return data_;
}
bool MoPenCreateDeviceResult::getCode()const
{
return code_;
}
bool MoPenCreateDeviceResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenDeleteGroupMemberRequest.h>
using AlibabaCloud::MoPen::Model::MoPenDeleteGroupMemberRequest;
MoPenDeleteGroupMemberRequest::MoPenDeleteGroupMemberRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenDeleteGroupMember")
{}
MoPenDeleteGroupMemberRequest::~MoPenDeleteGroupMemberRequest()
{}
long MoPenDeleteGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void MoPenDeleteGroupMemberRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string MoPenDeleteGroupMemberRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenDeleteGroupMemberRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenDeleteGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenDeleteGroupMemberResult::MoPenDeleteGroupMemberResult() :
ServiceResult()
{}
MoPenDeleteGroupMemberResult::MoPenDeleteGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenDeleteGroupMemberResult::~MoPenDeleteGroupMemberResult()
{}
void MoPenDeleteGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string MoPenDeleteGroupMemberResult::getDescription()const
{
return description_;
}
std::string MoPenDeleteGroupMemberResult::getMessage()const
{
return message_;
}
std::string MoPenDeleteGroupMemberResult::getCode()const
{
return code_;
}
bool MoPenDeleteGroupMemberResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenDeleteGroupRequest.h>
using AlibabaCloud::MoPen::Model::MoPenDeleteGroupRequest;
MoPenDeleteGroupRequest::MoPenDeleteGroupRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenDeleteGroup")
{}
MoPenDeleteGroupRequest::~MoPenDeleteGroupRequest()
{}
std::string MoPenDeleteGroupRequest::getGroupId()const
{
return groupId_;
}
void MoPenDeleteGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setParameter("GroupId", groupId);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenDeleteGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenDeleteGroupResult::MoPenDeleteGroupResult() :
ServiceResult()
{}
MoPenDeleteGroupResult::MoPenDeleteGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenDeleteGroupResult::~MoPenDeleteGroupResult()
{}
void MoPenDeleteGroupResult::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["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenDeleteGroupResult::getDescription()const
{
return description_;
}
std::string MoPenDeleteGroupResult::getMessage()const
{
return message_;
}
std::string MoPenDeleteGroupResult::getCode()const
{
return code_;
}
bool MoPenDeleteGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,104 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenDoRecognizeRequest.h>
using AlibabaCloud::MoPen::Model::MoPenDoRecognizeRequest;
MoPenDoRecognizeRequest::MoPenDoRecognizeRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenDoRecognize")
{}
MoPenDoRecognizeRequest::~MoPenDoRecognizeRequest()
{}
long MoPenDoRecognizeRequest::getCanvasId()const
{
return canvasId_;
}
void MoPenDoRecognizeRequest::setCanvasId(long canvasId)
{
canvasId_ = canvasId;
setParameter("CanvasId", std::to_string(canvasId));
}
int MoPenDoRecognizeRequest::getEndY()const
{
return endY_;
}
void MoPenDoRecognizeRequest::setEndY(int endY)
{
endY_ = endY;
setParameter("EndY", std::to_string(endY));
}
int MoPenDoRecognizeRequest::getEndX()const
{
return endX_;
}
void MoPenDoRecognizeRequest::setEndX(int endX)
{
endX_ = endX;
setParameter("EndX", std::to_string(endX));
}
std::string MoPenDoRecognizeRequest::getJsonConf()const
{
return jsonConf_;
}
void MoPenDoRecognizeRequest::setJsonConf(const std::string& jsonConf)
{
jsonConf_ = jsonConf;
setParameter("JsonConf", jsonConf);
}
std::string MoPenDoRecognizeRequest::getExportType()const
{
return exportType_;
}
void MoPenDoRecognizeRequest::setExportType(const std::string& exportType)
{
exportType_ = exportType;
setParameter("ExportType", exportType);
}
int MoPenDoRecognizeRequest::getStartY()const
{
return startY_;
}
void MoPenDoRecognizeRequest::setStartY(int startY)
{
startY_ = startY;
setParameter("StartY", std::to_string(startY));
}
int MoPenDoRecognizeRequest::getStartX()const
{
return startX_;
}
void MoPenDoRecognizeRequest::setStartX(int startX)
{
startX_ = startX;
setParameter("StartX", std::to_string(startX));
}

View File

@@ -0,0 +1,85 @@
/*
* 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/mopen/model/MoPenDoRecognizeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenDoRecognizeResult::MoPenDoRecognizeResult() :
ServiceResult()
{}
MoPenDoRecognizeResult::MoPenDoRecognizeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenDoRecognizeResult::~MoPenDoRecognizeResult()
{}
void MoPenDoRecognizeResult::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["Result"].isNull())
data_.result = dataNode["Result"].asString();
if(!dataNode["ResultType"].isNull())
data_.resultType = dataNode["ResultType"].asString();
if(!dataNode["CanvasId"].isNull())
data_.canvasId = std::stol(dataNode["CanvasId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenDoRecognizeResult::getDescription()const
{
return description_;
}
std::string MoPenDoRecognizeResult::getMessage()const
{
return message_;
}
MoPenDoRecognizeResult::Data MoPenDoRecognizeResult::getData()const
{
return data_;
}
std::string MoPenDoRecognizeResult::getCode()const
{
return code_;
}
bool MoPenDoRecognizeResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenFindGroupRequest.h>
using AlibabaCloud::MoPen::Model::MoPenFindGroupRequest;
MoPenFindGroupRequest::MoPenFindGroupRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenFindGroup")
{}
MoPenFindGroupRequest::~MoPenFindGroupRequest()
{}
std::string MoPenFindGroupRequest::getCreator()const
{
return creator_;
}
void MoPenFindGroupRequest::setCreator(const std::string& creator)
{
creator_ = creator;
setParameter("Creator", creator);
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenFindGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenFindGroupResult::MoPenFindGroupResult() :
ServiceResult()
{}
MoPenFindGroupResult::MoPenFindGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenFindGroupResult::~MoPenFindGroupResult()
{}
void MoPenFindGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["GroupId"].isNull())
data_.groupId = dataNode["GroupId"].asString();
if(!dataNode["Creator"].isNull())
data_.creator = dataNode["Creator"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string MoPenFindGroupResult::getDescription()const
{
return description_;
}
std::string MoPenFindGroupResult::getMessage()const
{
return message_;
}
MoPenFindGroupResult::Data MoPenFindGroupResult::getData()const
{
return data_;
}
int MoPenFindGroupResult::getCode()const
{
return code_;
}
std::string MoPenFindGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenQueryCanvasRequest.h>
using AlibabaCloud::MoPen::Model::MoPenQueryCanvasRequest;
MoPenQueryCanvasRequest::MoPenQueryCanvasRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenQueryCanvas")
{}
MoPenQueryCanvasRequest::~MoPenQueryCanvasRequest()
{}
std::string MoPenQueryCanvasRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenQueryCanvasRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}
std::string MoPenQueryCanvasRequest::getSessionId()const
{
return sessionId_;
}
void MoPenQueryCanvasRequest::setSessionId(const std::string& sessionId)
{
sessionId_ = sessionId;
setParameter("SessionId", sessionId);
}
int MoPenQueryCanvasRequest::getPageId()const
{
return pageId_;
}
void MoPenQueryCanvasRequest::setPageId(int pageId)
{
pageId_ = pageId;
setParameter("PageId", std::to_string(pageId));
}
int MoPenQueryCanvasRequest::getStatus()const
{
return status_;
}
void MoPenQueryCanvasRequest::setStatus(int status)
{
status_ = status;
setParameter("Status", std::to_string(status));
}

View File

@@ -0,0 +1,103 @@
/*
* 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/mopen/model/MoPenQueryCanvasResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenQueryCanvasResult::MoPenQueryCanvasResult() :
ServiceResult()
{}
MoPenQueryCanvasResult::MoPenQueryCanvasResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenQueryCanvasResult::~MoPenQueryCanvasResult()
{}
void MoPenQueryCanvasResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allCanvasList = value["CanvasList"]["Canvas"];
for (auto value : allCanvasList)
{
Data::Canvas canvasObject;
if(!value["Id"].isNull())
canvasObject.id = std::stol(value["Id"].asString());
if(!value["DeviceName"].isNull())
canvasObject.deviceName = value["DeviceName"].asString();
if(!value["Url"].isNull())
canvasObject.url = value["Url"].asString();
if(!value["PageId"].isNull())
canvasObject.pageId = std::stoi(value["PageId"].asString());
if(!value["SessionId"].isNull())
canvasObject.sessionId = value["SessionId"].asString();
if(!value["CreateTime"].isNull())
canvasObject.createTime = value["CreateTime"].asString();
if(!value["LastModified"].isNull())
canvasObject.lastModified = value["LastModified"].asString();
if(!value["Status"].isNull())
canvasObject.status = std::stoi(value["Status"].asString());
if(!value["Attribute"].isNull())
canvasObject.attribute = value["Attribute"].asString();
data_.canvasList.push_back(canvasObject);
}
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenQueryCanvasResult::getDescription()const
{
return description_;
}
std::string MoPenQueryCanvasResult::getMessage()const
{
return message_;
}
MoPenQueryCanvasResult::Data MoPenQueryCanvasResult::getData()const
{
return data_;
}
std::string MoPenQueryCanvasResult::getCode()const
{
return code_;
}
bool MoPenQueryCanvasResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MoPenSendMqttMessageRequest.h>
using AlibabaCloud::MoPen::Model::MoPenSendMqttMessageRequest;
MoPenSendMqttMessageRequest::MoPenSendMqttMessageRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MoPenSendMqttMessage")
{}
MoPenSendMqttMessageRequest::~MoPenSendMqttMessageRequest()
{}
std::string MoPenSendMqttMessageRequest::getPayload()const
{
return payload_;
}
void MoPenSendMqttMessageRequest::setPayload(const std::string& payload)
{
payload_ = payload;
setParameter("Payload", payload);
}
std::string MoPenSendMqttMessageRequest::getDeviceName()const
{
return deviceName_;
}
void MoPenSendMqttMessageRequest::setDeviceName(const std::string& deviceName)
{
deviceName_ = deviceName;
setParameter("DeviceName", deviceName);
}

View File

@@ -0,0 +1,73 @@
/*
* 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/mopen/model/MoPenSendMqttMessageResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MoPenSendMqttMessageResult::MoPenSendMqttMessageResult() :
ServiceResult()
{}
MoPenSendMqttMessageResult::MoPenSendMqttMessageResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MoPenSendMqttMessageResult::~MoPenSendMqttMessageResult()
{}
void MoPenSendMqttMessageResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["Description"].isNull())
description_ = value["Description"].asString();
}
std::string MoPenSendMqttMessageResult::getDescription()const
{
return description_;
}
std::string MoPenSendMqttMessageResult::getMessage()const
{
return message_;
}
std::string MoPenSendMqttMessageResult::getCode()const
{
return code_;
}
bool MoPenSendMqttMessageResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/mopen/model/MopenCreateGroupRequest.h>
using AlibabaCloud::MoPen::Model::MopenCreateGroupRequest;
MopenCreateGroupRequest::MopenCreateGroupRequest() :
RpcServiceRequest("mopen", "2018-02-11", "MopenCreateGroup")
{}
MopenCreateGroupRequest::~MopenCreateGroupRequest()
{}
std::string MopenCreateGroupRequest::getCreator()const
{
return creator_;
}
void MopenCreateGroupRequest::setCreator(const std::string& creator)
{
creator_ = creator;
setParameter("Creator", creator);
}

View File

@@ -0,0 +1,88 @@
/*
* 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/mopen/model/MopenCreateGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::MoPen;
using namespace AlibabaCloud::MoPen::Model;
MopenCreateGroupResult::MopenCreateGroupResult() :
ServiceResult()
{}
MopenCreateGroupResult::MopenCreateGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
MopenCreateGroupResult::~MopenCreateGroupResult()
{}
void MopenCreateGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["GroupId"].isNull())
data_.groupId = dataNode["GroupId"].asString();
if(!value["Code"].isNull())
code_ = std::stoi(value["Code"].asString());
if(!value["Success"].isNull())
success_ = value["Success"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["ResqusetId"].isNull())
resqusetId_ = value["ResqusetId"].asString();
}
std::string MopenCreateGroupResult::getResqusetId()const
{
return resqusetId_;
}
std::string MopenCreateGroupResult::getDescription()const
{
return description_;
}
std::string MopenCreateGroupResult::getMessage()const
{
return message_;
}
MopenCreateGroupResult::Data MopenCreateGroupResult::getData()const
{
return data_;
}
int MopenCreateGroupResult::getCode()const
{
return code_;
}
std::string MopenCreateGroupResult::getSuccess()const
{
return success_;
}