From bdeb75c7ee5130ebd76559e68deed263ad03e36f Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 14 Mar 2023 09:38:45 +0000 Subject: [PATCH] Deploy for Dypnsapi-intl. --- VERSION | 2 +- dypnsapi-intl/CMakeLists.txt | 94 ++++++++++ .../dypnsapi-intl/Dypnsapi_intlClient.h | 70 ++++++++ .../dypnsapi-intl/Dypnsapi_intlExport.h | 32 ++++ .../model/CheckVerificationRequest.h | 66 +++++++ .../model/CheckVerificationResult.h | 57 +++++++ .../model/SearchVerificationRequest.h | 75 ++++++++ .../model/SearchVerificationResult.h | 57 +++++++ .../model/StartVerificationRequest.h | 63 +++++++ .../model/StartVerificationResult.h | 57 +++++++ dypnsapi-intl/src/Dypnsapi-intlClient.cc | 161 ++++++++++++++++++ .../src/model/CheckVerificationRequest.cc | 108 ++++++++++++ .../src/model/CheckVerificationResult.cc | 72 ++++++++ .../src/model/SearchVerificationRequest.cc | 135 +++++++++++++++ .../src/model/SearchVerificationResult.cc | 72 ++++++++ .../src/model/StartVerificationRequest.cc | 99 +++++++++++ .../src/model/StartVerificationResult.cc | 72 ++++++++ 17 files changed, 1291 insertions(+), 1 deletion(-) create mode 100644 dypnsapi-intl/CMakeLists.txt create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlClient.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlExport.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationRequest.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationResult.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationRequest.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationResult.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationRequest.h create mode 100644 dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationResult.h create mode 100644 dypnsapi-intl/src/Dypnsapi-intlClient.cc create mode 100644 dypnsapi-intl/src/model/CheckVerificationRequest.cc create mode 100644 dypnsapi-intl/src/model/CheckVerificationResult.cc create mode 100644 dypnsapi-intl/src/model/SearchVerificationRequest.cc create mode 100644 dypnsapi-intl/src/model/SearchVerificationResult.cc create mode 100644 dypnsapi-intl/src/model/StartVerificationRequest.cc create mode 100644 dypnsapi-intl/src/model/StartVerificationResult.cc diff --git a/VERSION b/VERSION index 3d8da0eaf..e810820c2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1500 \ No newline at end of file +1.36.1501 \ No newline at end of file diff --git a/dypnsapi-intl/CMakeLists.txt b/dypnsapi-intl/CMakeLists.txt new file mode 100644 index 000000000..ca6f724b4 --- /dev/null +++ b/dypnsapi-intl/CMakeLists.txt @@ -0,0 +1,94 @@ +# +# 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(dypnsapi-intl_public_header + include/alibabacloud/dypnsapi-intl/Dypnsapi_intlClient.h + include/alibabacloud/dypnsapi-intl/Dypnsapi_intlExport.h ) + +set(dypnsapi-intl_public_header_model + include/alibabacloud/dypnsapi-intl/model/CheckVerificationRequest.h + include/alibabacloud/dypnsapi-intl/model/CheckVerificationResult.h + include/alibabacloud/dypnsapi-intl/model/SearchVerificationRequest.h + include/alibabacloud/dypnsapi-intl/model/SearchVerificationResult.h + include/alibabacloud/dypnsapi-intl/model/StartVerificationRequest.h + include/alibabacloud/dypnsapi-intl/model/StartVerificationResult.h ) + +set(dypnsapi-intl_src + src/Dypnsapi-intlClient.cc + src/model/CheckVerificationRequest.cc + src/model/CheckVerificationResult.cc + src/model/SearchVerificationRequest.cc + src/model/SearchVerificationResult.cc + src/model/StartVerificationRequest.cc + src/model/StartVerificationResult.cc ) + +add_library(dypnsapi-intl ${LIB_TYPE} + ${dypnsapi-intl_public_header} + ${dypnsapi-intl_public_header_model} + ${dypnsapi-intl_src}) + +set_target_properties(dypnsapi-intl + 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}dypnsapi-intl + ) + +if(${LIB_TYPE} STREQUAL "SHARED") + set_target_properties(dypnsapi-intl + PROPERTIES + DEFINE_SYMBOL ALIBABACLOUD_DYPNSAPI_INTL_LIBRARY) +endif() + +target_include_directories(dypnsapi-intl + PRIVATE include + ${CMAKE_SOURCE_DIR}/core/include + ) +target_link_libraries(dypnsapi-intl + core) + +if(CMAKE_HOST_WIN32) + ExternalProject_Get_Property(jsoncpp INSTALL_DIR) + set(jsoncpp_install_dir ${INSTALL_DIR}) + add_dependencies(dypnsapi-intl + jsoncpp) + target_include_directories(dypnsapi-intl + PRIVATE ${jsoncpp_install_dir}/include) + target_link_libraries(dypnsapi-intl + ${jsoncpp_install_dir}/lib/jsoncpp.lib) + set_target_properties(dypnsapi-intl + PROPERTIES + COMPILE_OPTIONS "/bigobj") +else() + target_include_directories(dypnsapi-intl + PRIVATE /usr/include/jsoncpp) + target_link_libraries(dypnsapi-intl + jsoncpp) +endif() + +install(FILES ${dypnsapi-intl_public_header} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/dypnsapi-intl) +install(FILES ${dypnsapi-intl_public_header_model} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/dypnsapi-intl/model) +install(TARGETS dypnsapi-intl + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) \ No newline at end of file diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlClient.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlClient.h new file mode 100644 index 000000000..843012f6d --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlClient.h @@ -0,0 +1,70 @@ +/* + * 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_DYPNSAPI_INTL_DYPNSAPI_INTLCLIENT_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_DYPNSAPI_INTLCLIENT_H_ + +#include +#include +#include +#include +#include "Dypnsapi_intlExport.h" +#include "model/CheckVerificationRequest.h" +#include "model/CheckVerificationResult.h" +#include "model/SearchVerificationRequest.h" +#include "model/SearchVerificationResult.h" +#include "model/StartVerificationRequest.h" +#include "model/StartVerificationResult.h" + + +namespace AlibabaCloud +{ + namespace Dypnsapi_intl + { + class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT Dypnsapi_intlClient : public RpcServiceClient + { + public: + typedef Outcome CheckVerificationOutcome; + typedef std::future CheckVerificationOutcomeCallable; + typedef std::function&)> CheckVerificationAsyncHandler; + typedef Outcome SearchVerificationOutcome; + typedef std::future SearchVerificationOutcomeCallable; + typedef std::function&)> SearchVerificationAsyncHandler; + typedef Outcome StartVerificationOutcome; + typedef std::future StartVerificationOutcomeCallable; + typedef std::function&)> StartVerificationAsyncHandler; + + Dypnsapi_intlClient(const Credentials &credentials, const ClientConfiguration &configuration); + Dypnsapi_intlClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); + Dypnsapi_intlClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); + ~Dypnsapi_intlClient(); + CheckVerificationOutcome checkVerification(const Model::CheckVerificationRequest &request)const; + void checkVerificationAsync(const Model::CheckVerificationRequest& request, const CheckVerificationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CheckVerificationOutcomeCallable checkVerificationCallable(const Model::CheckVerificationRequest& request) const; + SearchVerificationOutcome searchVerification(const Model::SearchVerificationRequest &request)const; + void searchVerificationAsync(const Model::SearchVerificationRequest& request, const SearchVerificationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SearchVerificationOutcomeCallable searchVerificationCallable(const Model::SearchVerificationRequest& request) const; + StartVerificationOutcome startVerification(const Model::StartVerificationRequest &request)const; + void startVerificationAsync(const Model::StartVerificationRequest& request, const StartVerificationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + StartVerificationOutcomeCallable startVerificationCallable(const Model::StartVerificationRequest& request) const; + + private: + std::shared_ptr endpointProvider_; + }; + } +} + +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_DYPNSAPI_INTLCLIENT_H_ diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlExport.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlExport.h new file mode 100644 index 000000000..372b485c2 --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/Dypnsapi_intlExport.h @@ -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_DYPNSAPI_INTL_DYPNSAPI_INTLEXPORT_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_DYPNSAPI_INTLEXPORT_H_ + +#include + +#if defined(ALIBABACLOUD_SHARED) +# if defined(ALIBABACLOUD_DYPNSAPI_INTL_LIBRARY) +# define ALIBABACLOUD_DYPNSAPI_INTL_EXPORT ALIBABACLOUD_DECL_EXPORT +# else +# define ALIBABACLOUD_DYPNSAPI_INTL_EXPORT ALIBABACLOUD_DECL_IMPORT +# endif +#else +# define ALIBABACLOUD_DYPNSAPI_INTL_EXPORT +#endif + +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_DYPNSAPI_INTLEXPORT_H_ \ No newline at end of file diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationRequest.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationRequest.h new file mode 100644 index 000000000..1649ee303 --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationRequest.h @@ -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_DYPNSAPI_INTL_MODEL_CHECKVERIFICATIONREQUEST_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_MODEL_CHECKVERIFICATIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dypnsapi_intl { +namespace Model { +class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT CheckVerificationRequest : public RpcServiceRequest { +public: + CheckVerificationRequest(); + ~CheckVerificationRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getCode() const; + void setCode(const std::string &code); + std::string getServiceSid() const; + void setServiceSid(const std::string &serviceSid); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + std::string getRouteName() const; + void setRouteName(const std::string &routeName); + std::string getVerificationId() const; + void setVerificationId(const std::string &verificationId); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getTo() const; + void setTo(const std::string &to); + +private: + long resourceOwnerId_; + std::string code_; + std::string serviceSid_; + std::string accessKeyId_; + std::string routeName_; + std::string verificationId_; + std::string resourceOwnerAccount_; + long ownerId_; + std::string to_; +}; +} // namespace Model +} // namespace Dypnsapi_intl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_MODEL_CHECKVERIFICATIONREQUEST_H_ diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationResult.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationResult.h new file mode 100644 index 000000000..cdf1adb45 --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/CheckVerificationResult.h @@ -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_DYPNSAPI_INTL_MODEL_CHECKVERIFICATIONRESULT_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_MODEL_CHECKVERIFICATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dypnsapi_intl + { + namespace Model + { + class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT CheckVerificationResult : public ServiceResult + { + public: + + + CheckVerificationResult(); + explicit CheckVerificationResult(const std::string &payload); + ~CheckVerificationResult(); + std::string getMessage()const; + std::string getModel()const; + std::string getCode()const; + std::string getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string model_; + std::string code_; + std::string success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_MODEL_CHECKVERIFICATIONRESULT_H_ \ No newline at end of file diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationRequest.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationRequest.h new file mode 100644 index 000000000..b0288cf63 --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationRequest.h @@ -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_DYPNSAPI_INTL_MODEL_SEARCHVERIFICATIONREQUEST_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_MODEL_SEARCHVERIFICATIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dypnsapi_intl { +namespace Model { +class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT SearchVerificationRequest : public RpcServiceRequest { +public: + SearchVerificationRequest(); + ~SearchVerificationRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getCode() const; + void setCode(const std::string &code); + std::string getServiceSid() const; + void setServiceSid(const std::string &serviceSid); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + long getSendDate() const; + void setSendDate(long sendDate); + long getPageSize() const; + void setPageSize(long pageSize); + std::string getRouteName() const; + void setRouteName(const std::string &routeName); + std::string getVerificationId() const; + void setVerificationId(const std::string &verificationId); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + long getCurrentPage() const; + void setCurrentPage(long currentPage); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getTo() const; + void setTo(const std::string &to); + +private: + long resourceOwnerId_; + std::string code_; + std::string serviceSid_; + std::string accessKeyId_; + long sendDate_; + long pageSize_; + std::string routeName_; + std::string verificationId_; + std::string resourceOwnerAccount_; + long currentPage_; + long ownerId_; + std::string to_; +}; +} // namespace Model +} // namespace Dypnsapi_intl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_MODEL_SEARCHVERIFICATIONREQUEST_H_ diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationResult.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationResult.h new file mode 100644 index 000000000..9edf537c0 --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/SearchVerificationResult.h @@ -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_DYPNSAPI_INTL_MODEL_SEARCHVERIFICATIONRESULT_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_MODEL_SEARCHVERIFICATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dypnsapi_intl + { + namespace Model + { + class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT SearchVerificationResult : public ServiceResult + { + public: + + + SearchVerificationResult(); + explicit SearchVerificationResult(const std::string &payload); + ~SearchVerificationResult(); + std::string getMessage()const; + std::string getModel()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string model_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_MODEL_SEARCHVERIFICATIONRESULT_H_ \ No newline at end of file diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationRequest.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationRequest.h new file mode 100644 index 000000000..54aa89a2a --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationRequest.h @@ -0,0 +1,63 @@ +/* + * 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_DYPNSAPI_INTL_MODEL_STARTVERIFICATIONREQUEST_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_MODEL_STARTVERIFICATIONREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Dypnsapi_intl { +namespace Model { +class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT StartVerificationRequest : public RpcServiceRequest { +public: + StartVerificationRequest(); + ~StartVerificationRequest(); + long getResourceOwnerId() const; + void setResourceOwnerId(long resourceOwnerId); + std::string getChannel() const; + void setChannel(const std::string &channel); + std::string getServiceSid() const; + void setServiceSid(const std::string &serviceSid); + std::string getAccessKeyId() const; + void setAccessKeyId(const std::string &accessKeyId); + std::string getRouteName() const; + void setRouteName(const std::string &routeName); + std::string getResourceOwnerAccount() const; + void setResourceOwnerAccount(const std::string &resourceOwnerAccount); + long getOwnerId() const; + void setOwnerId(long ownerId); + std::string getTo() const; + void setTo(const std::string &to); + +private: + long resourceOwnerId_; + std::string channel_; + std::string serviceSid_; + std::string accessKeyId_; + std::string routeName_; + std::string resourceOwnerAccount_; + long ownerId_; + std::string to_; +}; +} // namespace Model +} // namespace Dypnsapi_intl +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_MODEL_STARTVERIFICATIONREQUEST_H_ diff --git a/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationResult.h b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationResult.h new file mode 100644 index 000000000..aad292d33 --- /dev/null +++ b/dypnsapi-intl/include/alibabacloud/dypnsapi-intl/model/StartVerificationResult.h @@ -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_DYPNSAPI_INTL_MODEL_STARTVERIFICATIONRESULT_H_ +#define ALIBABACLOUD_DYPNSAPI_INTL_MODEL_STARTVERIFICATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Dypnsapi_intl + { + namespace Model + { + class ALIBABACLOUD_DYPNSAPI_INTL_EXPORT StartVerificationResult : public ServiceResult + { + public: + + + StartVerificationResult(); + explicit StartVerificationResult(const std::string &payload); + ~StartVerificationResult(); + std::string getMessage()const; + std::string getModel()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + std::string model_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DYPNSAPI_INTL_MODEL_STARTVERIFICATIONRESULT_H_ \ No newline at end of file diff --git a/dypnsapi-intl/src/Dypnsapi-intlClient.cc b/dypnsapi-intl/src/Dypnsapi-intlClient.cc new file mode 100644 index 000000000..cf04343a8 --- /dev/null +++ b/dypnsapi-intl/src/Dypnsapi-intlClient.cc @@ -0,0 +1,161 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud; +using namespace AlibabaCloud::Location; +using namespace AlibabaCloud::Dypnsapi_intl; +using namespace AlibabaCloud::Dypnsapi_intl::Model; + +namespace +{ + const std::string SERVICE_NAME = "Dypnsapi-intl"; +} + +Dypnsapi_intlClient::Dypnsapi_intlClient(const Credentials &credentials, const ClientConfiguration &configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) +{ + auto locationClient = std::make_shared(credentials, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Dypnsapi_intlClient::Dypnsapi_intlClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) +{ + auto locationClient = std::make_shared(credentialsProvider, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Dypnsapi_intlClient::Dypnsapi_intlClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : + RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) +{ + auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); +} + +Dypnsapi_intlClient::~Dypnsapi_intlClient() +{} + +Dypnsapi_intlClient::CheckVerificationOutcome Dypnsapi_intlClient::checkVerification(const CheckVerificationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CheckVerificationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CheckVerificationOutcome(CheckVerificationResult(outcome.result())); + else + return CheckVerificationOutcome(outcome.error()); +} + +void Dypnsapi_intlClient::checkVerificationAsync(const CheckVerificationRequest& request, const CheckVerificationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, checkVerification(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dypnsapi_intlClient::CheckVerificationOutcomeCallable Dypnsapi_intlClient::checkVerificationCallable(const CheckVerificationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->checkVerification(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dypnsapi_intlClient::SearchVerificationOutcome Dypnsapi_intlClient::searchVerification(const SearchVerificationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SearchVerificationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SearchVerificationOutcome(SearchVerificationResult(outcome.result())); + else + return SearchVerificationOutcome(outcome.error()); +} + +void Dypnsapi_intlClient::searchVerificationAsync(const SearchVerificationRequest& request, const SearchVerificationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, searchVerification(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dypnsapi_intlClient::SearchVerificationOutcomeCallable Dypnsapi_intlClient::searchVerificationCallable(const SearchVerificationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->searchVerification(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +Dypnsapi_intlClient::StartVerificationOutcome Dypnsapi_intlClient::startVerification(const StartVerificationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return StartVerificationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return StartVerificationOutcome(StartVerificationResult(outcome.result())); + else + return StartVerificationOutcome(outcome.error()); +} + +void Dypnsapi_intlClient::startVerificationAsync(const StartVerificationRequest& request, const StartVerificationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, startVerification(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Dypnsapi_intlClient::StartVerificationOutcomeCallable Dypnsapi_intlClient::startVerificationCallable(const StartVerificationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->startVerification(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/dypnsapi-intl/src/model/CheckVerificationRequest.cc b/dypnsapi-intl/src/model/CheckVerificationRequest.cc new file mode 100644 index 000000000..eda4a8578 --- /dev/null +++ b/dypnsapi-intl/src/model/CheckVerificationRequest.cc @@ -0,0 +1,108 @@ +/* + * 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 + +using AlibabaCloud::Dypnsapi_intl::Model::CheckVerificationRequest; + +CheckVerificationRequest::CheckVerificationRequest() + : RpcServiceRequest("dypnsapi-intl", "2017-07-25", "CheckVerification") { + setMethod(HttpRequest::Method::Post); +} + +CheckVerificationRequest::~CheckVerificationRequest() {} + +long CheckVerificationRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void CheckVerificationRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string CheckVerificationRequest::getCode() const { + return code_; +} + +void CheckVerificationRequest::setCode(const std::string &code) { + code_ = code; + setParameter(std::string("Code"), code); +} + +std::string CheckVerificationRequest::getServiceSid() const { + return serviceSid_; +} + +void CheckVerificationRequest::setServiceSid(const std::string &serviceSid) { + serviceSid_ = serviceSid; + setParameter(std::string("ServiceSid"), serviceSid); +} + +std::string CheckVerificationRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void CheckVerificationRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +std::string CheckVerificationRequest::getRouteName() const { + return routeName_; +} + +void CheckVerificationRequest::setRouteName(const std::string &routeName) { + routeName_ = routeName; + setParameter(std::string("RouteName"), routeName); +} + +std::string CheckVerificationRequest::getVerificationId() const { + return verificationId_; +} + +void CheckVerificationRequest::setVerificationId(const std::string &verificationId) { + verificationId_ = verificationId; + setParameter(std::string("VerificationId"), verificationId); +} + +std::string CheckVerificationRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void CheckVerificationRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +long CheckVerificationRequest::getOwnerId() const { + return ownerId_; +} + +void CheckVerificationRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string CheckVerificationRequest::getTo() const { + return to_; +} + +void CheckVerificationRequest::setTo(const std::string &to) { + to_ = to; + setParameter(std::string("To"), to); +} + diff --git a/dypnsapi-intl/src/model/CheckVerificationResult.cc b/dypnsapi-intl/src/model/CheckVerificationResult.cc new file mode 100644 index 000000000..e432e482b --- /dev/null +++ b/dypnsapi-intl/src/model/CheckVerificationResult.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Dypnsapi_intl; +using namespace AlibabaCloud::Dypnsapi_intl::Model; + +CheckVerificationResult::CheckVerificationResult() : + ServiceResult() +{} + +CheckVerificationResult::CheckVerificationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CheckVerificationResult::~CheckVerificationResult() +{} + +void CheckVerificationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Model"].isNull()) + model_ = value["Model"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString(); + +} + +std::string CheckVerificationResult::getMessage()const +{ + return message_; +} + +std::string CheckVerificationResult::getModel()const +{ + return model_; +} + +std::string CheckVerificationResult::getCode()const +{ + return code_; +} + +std::string CheckVerificationResult::getSuccess()const +{ + return success_; +} + diff --git a/dypnsapi-intl/src/model/SearchVerificationRequest.cc b/dypnsapi-intl/src/model/SearchVerificationRequest.cc new file mode 100644 index 000000000..b5c13d847 --- /dev/null +++ b/dypnsapi-intl/src/model/SearchVerificationRequest.cc @@ -0,0 +1,135 @@ +/* + * 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 + +using AlibabaCloud::Dypnsapi_intl::Model::SearchVerificationRequest; + +SearchVerificationRequest::SearchVerificationRequest() + : RpcServiceRequest("dypnsapi-intl", "2017-07-25", "SearchVerification") { + setMethod(HttpRequest::Method::Post); +} + +SearchVerificationRequest::~SearchVerificationRequest() {} + +long SearchVerificationRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void SearchVerificationRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string SearchVerificationRequest::getCode() const { + return code_; +} + +void SearchVerificationRequest::setCode(const std::string &code) { + code_ = code; + setParameter(std::string("Code"), code); +} + +std::string SearchVerificationRequest::getServiceSid() const { + return serviceSid_; +} + +void SearchVerificationRequest::setServiceSid(const std::string &serviceSid) { + serviceSid_ = serviceSid; + setParameter(std::string("ServiceSid"), serviceSid); +} + +std::string SearchVerificationRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void SearchVerificationRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +long SearchVerificationRequest::getSendDate() const { + return sendDate_; +} + +void SearchVerificationRequest::setSendDate(long sendDate) { + sendDate_ = sendDate; + setParameter(std::string("SendDate"), std::to_string(sendDate)); +} + +long SearchVerificationRequest::getPageSize() const { + return pageSize_; +} + +void SearchVerificationRequest::setPageSize(long pageSize) { + pageSize_ = pageSize; + setParameter(std::string("PageSize"), std::to_string(pageSize)); +} + +std::string SearchVerificationRequest::getRouteName() const { + return routeName_; +} + +void SearchVerificationRequest::setRouteName(const std::string &routeName) { + routeName_ = routeName; + setParameter(std::string("RouteName"), routeName); +} + +std::string SearchVerificationRequest::getVerificationId() const { + return verificationId_; +} + +void SearchVerificationRequest::setVerificationId(const std::string &verificationId) { + verificationId_ = verificationId; + setParameter(std::string("VerificationId"), verificationId); +} + +std::string SearchVerificationRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void SearchVerificationRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +long SearchVerificationRequest::getCurrentPage() const { + return currentPage_; +} + +void SearchVerificationRequest::setCurrentPage(long currentPage) { + currentPage_ = currentPage; + setParameter(std::string("CurrentPage"), std::to_string(currentPage)); +} + +long SearchVerificationRequest::getOwnerId() const { + return ownerId_; +} + +void SearchVerificationRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string SearchVerificationRequest::getTo() const { + return to_; +} + +void SearchVerificationRequest::setTo(const std::string &to) { + to_ = to; + setParameter(std::string("To"), to); +} + diff --git a/dypnsapi-intl/src/model/SearchVerificationResult.cc b/dypnsapi-intl/src/model/SearchVerificationResult.cc new file mode 100644 index 000000000..3c68497a5 --- /dev/null +++ b/dypnsapi-intl/src/model/SearchVerificationResult.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Dypnsapi_intl; +using namespace AlibabaCloud::Dypnsapi_intl::Model; + +SearchVerificationResult::SearchVerificationResult() : + ServiceResult() +{} + +SearchVerificationResult::SearchVerificationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SearchVerificationResult::~SearchVerificationResult() +{} + +void SearchVerificationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Model"].isNull()) + model_ = value["Model"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string SearchVerificationResult::getMessage()const +{ + return message_; +} + +std::string SearchVerificationResult::getModel()const +{ + return model_; +} + +std::string SearchVerificationResult::getCode()const +{ + return code_; +} + +bool SearchVerificationResult::getSuccess()const +{ + return success_; +} + diff --git a/dypnsapi-intl/src/model/StartVerificationRequest.cc b/dypnsapi-intl/src/model/StartVerificationRequest.cc new file mode 100644 index 000000000..21312c606 --- /dev/null +++ b/dypnsapi-intl/src/model/StartVerificationRequest.cc @@ -0,0 +1,99 @@ +/* + * 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 + +using AlibabaCloud::Dypnsapi_intl::Model::StartVerificationRequest; + +StartVerificationRequest::StartVerificationRequest() + : RpcServiceRequest("dypnsapi-intl", "2017-07-25", "StartVerification") { + setMethod(HttpRequest::Method::Post); +} + +StartVerificationRequest::~StartVerificationRequest() {} + +long StartVerificationRequest::getResourceOwnerId() const { + return resourceOwnerId_; +} + +void StartVerificationRequest::setResourceOwnerId(long resourceOwnerId) { + resourceOwnerId_ = resourceOwnerId; + setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId)); +} + +std::string StartVerificationRequest::getChannel() const { + return channel_; +} + +void StartVerificationRequest::setChannel(const std::string &channel) { + channel_ = channel; + setParameter(std::string("Channel"), channel); +} + +std::string StartVerificationRequest::getServiceSid() const { + return serviceSid_; +} + +void StartVerificationRequest::setServiceSid(const std::string &serviceSid) { + serviceSid_ = serviceSid; + setParameter(std::string("ServiceSid"), serviceSid); +} + +std::string StartVerificationRequest::getAccessKeyId() const { + return accessKeyId_; +} + +void StartVerificationRequest::setAccessKeyId(const std::string &accessKeyId) { + accessKeyId_ = accessKeyId; + setParameter(std::string("AccessKeyId"), accessKeyId); +} + +std::string StartVerificationRequest::getRouteName() const { + return routeName_; +} + +void StartVerificationRequest::setRouteName(const std::string &routeName) { + routeName_ = routeName; + setParameter(std::string("RouteName"), routeName); +} + +std::string StartVerificationRequest::getResourceOwnerAccount() const { + return resourceOwnerAccount_; +} + +void StartVerificationRequest::setResourceOwnerAccount(const std::string &resourceOwnerAccount) { + resourceOwnerAccount_ = resourceOwnerAccount; + setParameter(std::string("ResourceOwnerAccount"), resourceOwnerAccount); +} + +long StartVerificationRequest::getOwnerId() const { + return ownerId_; +} + +void StartVerificationRequest::setOwnerId(long ownerId) { + ownerId_ = ownerId; + setParameter(std::string("OwnerId"), std::to_string(ownerId)); +} + +std::string StartVerificationRequest::getTo() const { + return to_; +} + +void StartVerificationRequest::setTo(const std::string &to) { + to_ = to; + setParameter(std::string("To"), to); +} + diff --git a/dypnsapi-intl/src/model/StartVerificationResult.cc b/dypnsapi-intl/src/model/StartVerificationResult.cc new file mode 100644 index 000000000..ce7a72a7c --- /dev/null +++ b/dypnsapi-intl/src/model/StartVerificationResult.cc @@ -0,0 +1,72 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Dypnsapi_intl; +using namespace AlibabaCloud::Dypnsapi_intl::Model; + +StartVerificationResult::StartVerificationResult() : + ServiceResult() +{} + +StartVerificationResult::StartVerificationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +StartVerificationResult::~StartVerificationResult() +{} + +void StartVerificationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Model"].isNull()) + model_ = value["Model"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + if(!value["Success"].isNull()) + success_ = value["Success"].asString() == "true"; + +} + +std::string StartVerificationResult::getMessage()const +{ + return message_; +} + +std::string StartVerificationResult::getModel()const +{ + return model_; +} + +std::string StartVerificationResult::getCode()const +{ + return code_; +} + +bool StartVerificationResult::getSuccess()const +{ + return success_; +} +