diff --git a/CHANGELOG b/CHANGELOG index 5ba80a22c..d2ee84446 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2019-04-09 Version: 1.35.8 +1, Add Apis for offline VerifySDK. + 2019-04-08 Version: 1.35.7 1, Modify DescribeBackupPlanList DBS interface. 2, Modify DescribeFullBackupList DBS interface. diff --git a/VERSION b/VERSION index 63c3ccc08..d91a76026 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.35.7 \ No newline at end of file +1.35.8 \ No newline at end of file diff --git a/cloudauth/CMakeLists.txt b/cloudauth/CMakeLists.txt index 336144a21..ed56f1fb6 100644 --- a/cloudauth/CMakeLists.txt +++ b/cloudauth/CMakeLists.txt @@ -21,6 +21,8 @@ set(cloudauth_public_header include/alibabacloud/cloudauth/CloudauthExport.h ) set(cloudauth_public_header_model + include/alibabacloud/cloudauth/model/DescribeDeviceInfoRequest.h + include/alibabacloud/cloudauth/model/DescribeDeviceInfoResult.h include/alibabacloud/cloudauth/model/GetMaterialsRequest.h include/alibabacloud/cloudauth/model/GetMaterialsResult.h include/alibabacloud/cloudauth/model/GetVerifyTokenRequest.h @@ -29,13 +31,25 @@ set(cloudauth_public_header_model include/alibabacloud/cloudauth/model/DetectFaceAttributesResult.h include/alibabacloud/cloudauth/model/CompareFacesRequest.h include/alibabacloud/cloudauth/model/CompareFacesResult.h + include/alibabacloud/cloudauth/model/CreateAuthKeyRequest.h + include/alibabacloud/cloudauth/model/CreateAuthKeyResult.h include/alibabacloud/cloudauth/model/SubmitMaterialsRequest.h include/alibabacloud/cloudauth/model/SubmitMaterialsResult.h + include/alibabacloud/cloudauth/model/SubmitVerificationRequest.h + include/alibabacloud/cloudauth/model/SubmitVerificationResult.h + include/alibabacloud/cloudauth/model/CreateVerifySDKRequest.h + include/alibabacloud/cloudauth/model/CreateVerifySDKResult.h + include/alibabacloud/cloudauth/model/ModifyDeviceInfoRequest.h + include/alibabacloud/cloudauth/model/ModifyDeviceInfoResult.h + include/alibabacloud/cloudauth/model/DescribeVerifySDKRequest.h + include/alibabacloud/cloudauth/model/DescribeVerifySDKResult.h include/alibabacloud/cloudauth/model/GetStatusRequest.h include/alibabacloud/cloudauth/model/GetStatusResult.h ) set(cloudauth_src src/CloudauthClient.cc + src/model/DescribeDeviceInfoRequest.cc + src/model/DescribeDeviceInfoResult.cc src/model/GetMaterialsRequest.cc src/model/GetMaterialsResult.cc src/model/GetVerifyTokenRequest.cc @@ -44,8 +58,18 @@ set(cloudauth_src src/model/DetectFaceAttributesResult.cc src/model/CompareFacesRequest.cc src/model/CompareFacesResult.cc + src/model/CreateAuthKeyRequest.cc + src/model/CreateAuthKeyResult.cc src/model/SubmitMaterialsRequest.cc src/model/SubmitMaterialsResult.cc + src/model/SubmitVerificationRequest.cc + src/model/SubmitVerificationResult.cc + src/model/CreateVerifySDKRequest.cc + src/model/CreateVerifySDKResult.cc + src/model/ModifyDeviceInfoRequest.cc + src/model/ModifyDeviceInfoResult.cc + src/model/DescribeVerifySDKRequest.cc + src/model/DescribeVerifySDKResult.cc src/model/GetStatusRequest.cc src/model/GetStatusResult.cc ) diff --git a/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h b/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h index 5c197fbc3..4ae05fc90 100644 --- a/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h +++ b/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h @@ -22,6 +22,8 @@ #include #include #include "CloudauthExport.h" +#include "model/DescribeDeviceInfoRequest.h" +#include "model/DescribeDeviceInfoResult.h" #include "model/GetMaterialsRequest.h" #include "model/GetMaterialsResult.h" #include "model/GetVerifyTokenRequest.h" @@ -30,8 +32,18 @@ #include "model/DetectFaceAttributesResult.h" #include "model/CompareFacesRequest.h" #include "model/CompareFacesResult.h" +#include "model/CreateAuthKeyRequest.h" +#include "model/CreateAuthKeyResult.h" #include "model/SubmitMaterialsRequest.h" #include "model/SubmitMaterialsResult.h" +#include "model/SubmitVerificationRequest.h" +#include "model/SubmitVerificationResult.h" +#include "model/CreateVerifySDKRequest.h" +#include "model/CreateVerifySDKResult.h" +#include "model/ModifyDeviceInfoRequest.h" +#include "model/ModifyDeviceInfoResult.h" +#include "model/DescribeVerifySDKRequest.h" +#include "model/DescribeVerifySDKResult.h" #include "model/GetStatusRequest.h" #include "model/GetStatusResult.h" @@ -43,6 +55,9 @@ namespace AlibabaCloud class ALIBABACLOUD_CLOUDAUTH_EXPORT CloudauthClient : public RpcServiceClient { public: + typedef Outcome DescribeDeviceInfoOutcome; + typedef std::future DescribeDeviceInfoOutcomeCallable; + typedef std::function&)> DescribeDeviceInfoAsyncHandler; typedef Outcome GetMaterialsOutcome; typedef std::future GetMaterialsOutcomeCallable; typedef std::function&)> GetMaterialsAsyncHandler; @@ -55,9 +70,24 @@ namespace AlibabaCloud typedef Outcome CompareFacesOutcome; typedef std::future CompareFacesOutcomeCallable; typedef std::function&)> CompareFacesAsyncHandler; + typedef Outcome CreateAuthKeyOutcome; + typedef std::future CreateAuthKeyOutcomeCallable; + typedef std::function&)> CreateAuthKeyAsyncHandler; typedef Outcome SubmitMaterialsOutcome; typedef std::future SubmitMaterialsOutcomeCallable; typedef std::function&)> SubmitMaterialsAsyncHandler; + typedef Outcome SubmitVerificationOutcome; + typedef std::future SubmitVerificationOutcomeCallable; + typedef std::function&)> SubmitVerificationAsyncHandler; + typedef Outcome CreateVerifySDKOutcome; + typedef std::future CreateVerifySDKOutcomeCallable; + typedef std::function&)> CreateVerifySDKAsyncHandler; + typedef Outcome ModifyDeviceInfoOutcome; + typedef std::future ModifyDeviceInfoOutcomeCallable; + typedef std::function&)> ModifyDeviceInfoAsyncHandler; + typedef Outcome DescribeVerifySDKOutcome; + typedef std::future DescribeVerifySDKOutcomeCallable; + typedef std::function&)> DescribeVerifySDKAsyncHandler; typedef Outcome GetStatusOutcome; typedef std::future GetStatusOutcomeCallable; typedef std::function&)> GetStatusAsyncHandler; @@ -66,6 +96,9 @@ namespace AlibabaCloud CloudauthClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); CloudauthClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~CloudauthClient(); + DescribeDeviceInfoOutcome describeDeviceInfo(const Model::DescribeDeviceInfoRequest &request)const; + void describeDeviceInfoAsync(const Model::DescribeDeviceInfoRequest& request, const DescribeDeviceInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeDeviceInfoOutcomeCallable describeDeviceInfoCallable(const Model::DescribeDeviceInfoRequest& request) const; GetMaterialsOutcome getMaterials(const Model::GetMaterialsRequest &request)const; void getMaterialsAsync(const Model::GetMaterialsRequest& request, const GetMaterialsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetMaterialsOutcomeCallable getMaterialsCallable(const Model::GetMaterialsRequest& request) const; @@ -78,9 +111,24 @@ namespace AlibabaCloud CompareFacesOutcome compareFaces(const Model::CompareFacesRequest &request)const; void compareFacesAsync(const Model::CompareFacesRequest& request, const CompareFacesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CompareFacesOutcomeCallable compareFacesCallable(const Model::CompareFacesRequest& request) const; + CreateAuthKeyOutcome createAuthKey(const Model::CreateAuthKeyRequest &request)const; + void createAuthKeyAsync(const Model::CreateAuthKeyRequest& request, const CreateAuthKeyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateAuthKeyOutcomeCallable createAuthKeyCallable(const Model::CreateAuthKeyRequest& request) const; SubmitMaterialsOutcome submitMaterials(const Model::SubmitMaterialsRequest &request)const; void submitMaterialsAsync(const Model::SubmitMaterialsRequest& request, const SubmitMaterialsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; SubmitMaterialsOutcomeCallable submitMaterialsCallable(const Model::SubmitMaterialsRequest& request) const; + SubmitVerificationOutcome submitVerification(const Model::SubmitVerificationRequest &request)const; + void submitVerificationAsync(const Model::SubmitVerificationRequest& request, const SubmitVerificationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + SubmitVerificationOutcomeCallable submitVerificationCallable(const Model::SubmitVerificationRequest& request) const; + CreateVerifySDKOutcome createVerifySDK(const Model::CreateVerifySDKRequest &request)const; + void createVerifySDKAsync(const Model::CreateVerifySDKRequest& request, const CreateVerifySDKAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateVerifySDKOutcomeCallable createVerifySDKCallable(const Model::CreateVerifySDKRequest& request) const; + ModifyDeviceInfoOutcome modifyDeviceInfo(const Model::ModifyDeviceInfoRequest &request)const; + void modifyDeviceInfoAsync(const Model::ModifyDeviceInfoRequest& request, const ModifyDeviceInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ModifyDeviceInfoOutcomeCallable modifyDeviceInfoCallable(const Model::ModifyDeviceInfoRequest& request) const; + DescribeVerifySDKOutcome describeVerifySDK(const Model::DescribeVerifySDKRequest &request)const; + void describeVerifySDKAsync(const Model::DescribeVerifySDKRequest& request, const DescribeVerifySDKAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + DescribeVerifySDKOutcomeCallable describeVerifySDKCallable(const Model::DescribeVerifySDKRequest& request) const; GetStatusOutcome getStatus(const Model::GetStatusRequest &request)const; void getStatusAsync(const Model::GetStatusRequest& request, const GetStatusAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetStatusOutcomeCallable getStatusCallable(const Model::GetStatusRequest& request) const; diff --git a/cloudauth/include/alibabacloud/cloudauth/model/CreateAuthKeyRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/CreateAuthKeyRequest.h new file mode 100644 index 000000000..128fcce4c --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/CreateAuthKeyRequest.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_CLOUDAUTH_MODEL_CREATEAUTHKEYREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEAUTHKEYREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT CreateAuthKeyRequest : public RpcServiceRequest + { + + public: + CreateAuthKeyRequest(); + ~CreateAuthKeyRequest(); + + std::string getBizType()const; + void setBizType(const std::string& bizType); + std::string getUserDeviceId()const; + void setUserDeviceId(const std::string& userDeviceId); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + bool getTest()const; + void setTest(bool test); + int getAuthYears()const; + void setAuthYears(int authYears); + std::string getLang()const; + void setLang(const std::string& lang); + + private: + std::string bizType_; + std::string userDeviceId_; + std::string sourceIp_; + bool test_; + int authYears_; + std::string lang_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEAUTHKEYREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/CreateAuthKeyResult.h b/cloudauth/include/alibabacloud/cloudauth/model/CreateAuthKeyResult.h new file mode 100644 index 000000000..d86613bd8 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/CreateAuthKeyResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEAUTHKEYRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEAUTHKEYRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT CreateAuthKeyResult : public ServiceResult + { + public: + + + CreateAuthKeyResult(); + explicit CreateAuthKeyResult(const std::string &payload); + ~CreateAuthKeyResult(); + std::string getAuthKey()const; + + protected: + void parse(const std::string &payload); + private: + std::string authKey_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEAUTHKEYRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/CreateVerifySDKRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/CreateVerifySDKRequest.h new file mode 100644 index 000000000..de12a2c3d --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/CreateVerifySDKRequest.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_CLOUDAUTH_MODEL_CREATEVERIFYSDKREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEVERIFYSDKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT CreateVerifySDKRequest : public RpcServiceRequest + { + + public: + CreateVerifySDKRequest(); + ~CreateVerifySDKRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getAppUrl()const; + void setAppUrl(const std::string& appUrl); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getPlatform()const; + void setPlatform(const std::string& platform); + + private: + std::string sourceIp_; + std::string appUrl_; + std::string lang_; + std::string platform_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEVERIFYSDKREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/CreateVerifySDKResult.h b/cloudauth/include/alibabacloud/cloudauth/model/CreateVerifySDKResult.h new file mode 100644 index 000000000..9f2d6ecd3 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/CreateVerifySDKResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEVERIFYSDKRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEVERIFYSDKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT CreateVerifySDKResult : public ServiceResult + { + public: + + + CreateVerifySDKResult(); + explicit CreateVerifySDKResult(const std::string &payload); + ~CreateVerifySDKResult(); + std::string getTaskId()const; + + protected: + void parse(const std::string &payload); + private: + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_CREATEVERIFYSDKRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/DescribeDeviceInfoRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/DescribeDeviceInfoRequest.h new file mode 100644 index 000000000..2a8aa4640 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/DescribeDeviceInfoRequest.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_CLOUDAUTH_MODEL_DESCRIBEDEVICEINFOREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEDEVICEINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT DescribeDeviceInfoRequest : public RpcServiceRequest + { + + public: + DescribeDeviceInfoRequest(); + ~DescribeDeviceInfoRequest(); + + std::string getBizType()const; + void setBizType(const std::string& bizType); + std::string getUserDeviceId()const; + void setUserDeviceId(const std::string& userDeviceId); + int getTotalCount()const; + void setTotalCount(int totalCount); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + int getPageSize()const; + void setPageSize(int pageSize); + int getCurrentPage()const; + void setCurrentPage(int currentPage); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getExpiredEndDay()const; + void setExpiredEndDay(const std::string& expiredEndDay); + std::string getDeviceId()const; + void setDeviceId(const std::string& deviceId); + std::string getExpiredStartDay()const; + void setExpiredStartDay(const std::string& expiredStartDay); + + private: + std::string bizType_; + std::string userDeviceId_; + int totalCount_; + std::string sourceIp_; + int pageSize_; + int currentPage_; + std::string lang_; + std::string expiredEndDay_; + std::string deviceId_; + std::string expiredStartDay_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEDEVICEINFOREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/DescribeDeviceInfoResult.h b/cloudauth/include/alibabacloud/cloudauth/model/DescribeDeviceInfoResult.h new file mode 100644 index 000000000..6cf9182a0 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/DescribeDeviceInfoResult.h @@ -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_CLOUDAUTH_MODEL_DESCRIBEDEVICEINFORESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEDEVICEINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT DescribeDeviceInfoResult : public ServiceResult + { + public: + struct DeviceInfo + { + std::string expiredDay; + std::string beginDay; + std::string deviceId; + std::string bizType; + std::string userDeviceId; + }; + + + DescribeDeviceInfoResult(); + explicit DescribeDeviceInfoResult(const std::string &payload); + ~DescribeDeviceInfoResult(); + std::vector getDeviceInfoList()const; + int getTotalCount()const; + int getPageSize()const; + int getCurrentPage()const; + + protected: + void parse(const std::string &payload); + private: + std::vector deviceInfoList_; + int totalCount_; + int pageSize_; + int currentPage_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEDEVICEINFORESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/DescribeVerifySDKRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/DescribeVerifySDKRequest.h new file mode 100644 index 000000000..61fa7a1f8 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/DescribeVerifySDKRequest.h @@ -0,0 +1,54 @@ +/* + * 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_CLOUDAUTH_MODEL_DESCRIBEVERIFYSDKREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEVERIFYSDKREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT DescribeVerifySDKRequest : public RpcServiceRequest + { + + public: + DescribeVerifySDKRequest(); + ~DescribeVerifySDKRequest(); + + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getTaskId()const; + void setTaskId(const std::string& taskId); + + private: + std::string sourceIp_; + std::string lang_; + std::string taskId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEVERIFYSDKREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/DescribeVerifySDKResult.h b/cloudauth/include/alibabacloud/cloudauth/model/DescribeVerifySDKResult.h new file mode 100644 index 000000000..7c32a6625 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/DescribeVerifySDKResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEVERIFYSDKRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEVERIFYSDKRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT DescribeVerifySDKResult : public ServiceResult + { + public: + + + DescribeVerifySDKResult(); + explicit DescribeVerifySDKResult(const std::string &payload); + ~DescribeVerifySDKResult(); + std::string getSdkUrl()const; + + protected: + void parse(const std::string &payload); + private: + std::string sdkUrl_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_DESCRIBEVERIFYSDKRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/GetStatusResult.h b/cloudauth/include/alibabacloud/cloudauth/model/GetStatusResult.h index bd41650ad..aaf8d3390 100644 --- a/cloudauth/include/alibabacloud/cloudauth/model/GetStatusResult.h +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetStatusResult.h @@ -36,6 +36,7 @@ namespace AlibabaCloud { std::string auditConclusions; float trustedScore; + float authorityComparisonScore; float similarityScore; int statusCode; }; diff --git a/cloudauth/include/alibabacloud/cloudauth/model/ModifyDeviceInfoRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/ModifyDeviceInfoRequest.h new file mode 100644 index 000000000..7579fdb9e --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/ModifyDeviceInfoRequest.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_CLOUDAUTH_MODEL_MODIFYDEVICEINFOREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_MODIFYDEVICEINFOREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT ModifyDeviceInfoRequest : public RpcServiceRequest + { + + public: + ModifyDeviceInfoRequest(); + ~ModifyDeviceInfoRequest(); + + std::string getUserDeviceId()const; + void setUserDeviceId(const std::string& userDeviceId); + std::string getBizType()const; + void setBizType(const std::string& bizType); + std::string getDuration()const; + void setDuration(const std::string& duration); + std::string getExpiredDay()const; + void setExpiredDay(const std::string& expiredDay); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getLang()const; + void setLang(const std::string& lang); + std::string getDeviceId()const; + void setDeviceId(const std::string& deviceId); + + private: + std::string userDeviceId_; + std::string bizType_; + std::string duration_; + std::string expiredDay_; + std::string sourceIp_; + std::string lang_; + std::string deviceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_MODIFYDEVICEINFOREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/ModifyDeviceInfoResult.h b/cloudauth/include/alibabacloud/cloudauth/model/ModifyDeviceInfoResult.h new file mode 100644 index 000000000..7d182bf88 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/ModifyDeviceInfoResult.h @@ -0,0 +1,59 @@ +/* + * 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_CLOUDAUTH_MODEL_MODIFYDEVICEINFORESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_MODIFYDEVICEINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT ModifyDeviceInfoResult : public ServiceResult + { + public: + + + ModifyDeviceInfoResult(); + explicit ModifyDeviceInfoResult(const std::string &payload); + ~ModifyDeviceInfoResult(); + std::string getExpiredDay()const; + std::string getBeginDay()const; + std::string getDeviceId()const; + std::string getBizType()const; + std::string getUserDeviceId()const; + + protected: + void parse(const std::string &payload); + private: + std::string expiredDay_; + std::string beginDay_; + std::string deviceId_; + std::string bizType_; + std::string userDeviceId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_MODIFYDEVICEINFORESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsResult.h b/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsResult.h index 91b3099bb..c8e4361e5 100644 --- a/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsResult.h +++ b/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsResult.h @@ -38,6 +38,7 @@ namespace AlibabaCloud { std::string auditConclusions; float trustedScore; + float authorityComparisonScore; float similarityScore; int statusCode; }; diff --git a/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationRequest.h new file mode 100644 index 000000000..430546723 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationRequest.h @@ -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_CLOUDAUTH_MODEL_SUBMITVERIFICATIONREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITVERIFICATIONREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT SubmitVerificationRequest : public RpcServiceRequest + { + struct Material + { + std::string materialType; + std::string value; + }; + + public: + SubmitVerificationRequest(); + ~SubmitVerificationRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getBiz()const; + void setBiz(const std::string& biz); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::vector getMaterial()const; + void setMaterial(const std::vector& material); + std::string getTicketId()const; + void setTicketId(const std::string& ticketId); + + private: + long resourceOwnerId_; + std::string biz_; + std::string sourceIp_; + std::vector material_; + std::string ticketId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITVERIFICATIONREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationResult.h b/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationResult.h new file mode 100644 index 000000000..a279b0099 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationResult.h @@ -0,0 +1,69 @@ +/* + * 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_CLOUDAUTH_MODEL_SUBMITVERIFICATIONRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITVERIFICATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT SubmitVerificationResult : public ServiceResult + { + public: + struct Data + { + struct VerifyStatus + { + std::string auditConclusions; + float trustedScore; + float authorityComparisonScore; + float similarityScore; + int statusCode; + }; + VerifyStatus verifyStatus; + }; + + + SubmitVerificationResult(); + explicit SubmitVerificationResult(const std::string &payload); + ~SubmitVerificationResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITVERIFICATIONRESULT_H_ \ No newline at end of file diff --git a/cloudauth/src/CloudauthClient.cc b/cloudauth/src/CloudauthClient.cc index faa617d53..4ab3c2b2a 100644 --- a/cloudauth/src/CloudauthClient.cc +++ b/cloudauth/src/CloudauthClient.cc @@ -51,6 +51,42 @@ CloudauthClient::CloudauthClient(const std::string & accessKeyId, const std::str CloudauthClient::~CloudauthClient() {} +CloudauthClient::DescribeDeviceInfoOutcome CloudauthClient::describeDeviceInfo(const DescribeDeviceInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeDeviceInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeDeviceInfoOutcome(DescribeDeviceInfoResult(outcome.result())); + else + return DescribeDeviceInfoOutcome(outcome.error()); +} + +void CloudauthClient::describeDeviceInfoAsync(const DescribeDeviceInfoRequest& request, const DescribeDeviceInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeDeviceInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::DescribeDeviceInfoOutcomeCallable CloudauthClient::describeDeviceInfoCallable(const DescribeDeviceInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeDeviceInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CloudauthClient::GetMaterialsOutcome CloudauthClient::getMaterials(const GetMaterialsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -195,6 +231,42 @@ CloudauthClient::CompareFacesOutcomeCallable CloudauthClient::compareFacesCallab return task->get_future(); } +CloudauthClient::CreateAuthKeyOutcome CloudauthClient::createAuthKey(const CreateAuthKeyRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateAuthKeyOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateAuthKeyOutcome(CreateAuthKeyResult(outcome.result())); + else + return CreateAuthKeyOutcome(outcome.error()); +} + +void CloudauthClient::createAuthKeyAsync(const CreateAuthKeyRequest& request, const CreateAuthKeyAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createAuthKey(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::CreateAuthKeyOutcomeCallable CloudauthClient::createAuthKeyCallable(const CreateAuthKeyRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createAuthKey(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CloudauthClient::SubmitMaterialsOutcome CloudauthClient::submitMaterials(const SubmitMaterialsRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -231,6 +303,150 @@ CloudauthClient::SubmitMaterialsOutcomeCallable CloudauthClient::submitMaterials return task->get_future(); } +CloudauthClient::SubmitVerificationOutcome CloudauthClient::submitVerification(const SubmitVerificationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SubmitVerificationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SubmitVerificationOutcome(SubmitVerificationResult(outcome.result())); + else + return SubmitVerificationOutcome(outcome.error()); +} + +void CloudauthClient::submitVerificationAsync(const SubmitVerificationRequest& request, const SubmitVerificationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, submitVerification(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::SubmitVerificationOutcomeCallable CloudauthClient::submitVerificationCallable(const SubmitVerificationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->submitVerification(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CloudauthClient::CreateVerifySDKOutcome CloudauthClient::createVerifySDK(const CreateVerifySDKRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateVerifySDKOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateVerifySDKOutcome(CreateVerifySDKResult(outcome.result())); + else + return CreateVerifySDKOutcome(outcome.error()); +} + +void CloudauthClient::createVerifySDKAsync(const CreateVerifySDKRequest& request, const CreateVerifySDKAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createVerifySDK(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::CreateVerifySDKOutcomeCallable CloudauthClient::createVerifySDKCallable(const CreateVerifySDKRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createVerifySDK(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CloudauthClient::ModifyDeviceInfoOutcome CloudauthClient::modifyDeviceInfo(const ModifyDeviceInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ModifyDeviceInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ModifyDeviceInfoOutcome(ModifyDeviceInfoResult(outcome.result())); + else + return ModifyDeviceInfoOutcome(outcome.error()); +} + +void CloudauthClient::modifyDeviceInfoAsync(const ModifyDeviceInfoRequest& request, const ModifyDeviceInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, modifyDeviceInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::ModifyDeviceInfoOutcomeCallable CloudauthClient::modifyDeviceInfoCallable(const ModifyDeviceInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->modifyDeviceInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CloudauthClient::DescribeVerifySDKOutcome CloudauthClient::describeVerifySDK(const DescribeVerifySDKRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return DescribeVerifySDKOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return DescribeVerifySDKOutcome(DescribeVerifySDKResult(outcome.result())); + else + return DescribeVerifySDKOutcome(outcome.error()); +} + +void CloudauthClient::describeVerifySDKAsync(const DescribeVerifySDKRequest& request, const DescribeVerifySDKAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, describeVerifySDK(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::DescribeVerifySDKOutcomeCallable CloudauthClient::describeVerifySDKCallable(const DescribeVerifySDKRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->describeVerifySDK(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CloudauthClient::GetStatusOutcome CloudauthClient::getStatus(const GetStatusRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/cloudauth/src/model/CompareFacesRequest.cc b/cloudauth/src/model/CompareFacesRequest.cc index a7fededd6..2eda0f298 100644 --- a/cloudauth/src/model/CompareFacesRequest.cc +++ b/cloudauth/src/model/CompareFacesRequest.cc @@ -33,7 +33,7 @@ std::string CompareFacesRequest::getSourceImageType()const void CompareFacesRequest::setSourceImageType(const std::string& sourceImageType) { sourceImageType_ = sourceImageType; - setParameter("SourceImageType", sourceImageType); + setCoreParameter("SourceImageType", sourceImageType); } long CompareFacesRequest::getResourceOwnerId()const @@ -44,7 +44,7 @@ long CompareFacesRequest::getResourceOwnerId()const void CompareFacesRequest::setResourceOwnerId(long resourceOwnerId) { resourceOwnerId_ = resourceOwnerId; - setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } std::string CompareFacesRequest::getSourceIp()const @@ -55,7 +55,7 @@ std::string CompareFacesRequest::getSourceIp()const void CompareFacesRequest::setSourceIp(const std::string& sourceIp) { sourceIp_ = sourceIp; - setParameter("SourceIp", sourceIp); + setCoreParameter("SourceIp", sourceIp); } std::string CompareFacesRequest::getTargetImageType()const @@ -66,7 +66,7 @@ std::string CompareFacesRequest::getTargetImageType()const void CompareFacesRequest::setTargetImageType(const std::string& targetImageType) { targetImageType_ = targetImageType; - setParameter("TargetImageType", targetImageType); + setCoreParameter("TargetImageType", targetImageType); } std::string CompareFacesRequest::getSourceImageValue()const @@ -77,7 +77,7 @@ std::string CompareFacesRequest::getSourceImageValue()const void CompareFacesRequest::setSourceImageValue(const std::string& sourceImageValue) { sourceImageValue_ = sourceImageValue; - setParameter("SourceImageValue", sourceImageValue); + setCoreParameter("SourceImageValue", sourceImageValue); } std::string CompareFacesRequest::getTargetImageValue()const @@ -88,6 +88,6 @@ std::string CompareFacesRequest::getTargetImageValue()const void CompareFacesRequest::setTargetImageValue(const std::string& targetImageValue) { targetImageValue_ = targetImageValue; - setParameter("TargetImageValue", targetImageValue); + setCoreParameter("TargetImageValue", targetImageValue); } diff --git a/cloudauth/src/model/CreateAuthKeyRequest.cc b/cloudauth/src/model/CreateAuthKeyRequest.cc new file mode 100644 index 000000000..c75295058 --- /dev/null +++ b/cloudauth/src/model/CreateAuthKeyRequest.cc @@ -0,0 +1,93 @@ +/* + * 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::Cloudauth::Model::CreateAuthKeyRequest; + +CreateAuthKeyRequest::CreateAuthKeyRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "CreateAuthKey") +{} + +CreateAuthKeyRequest::~CreateAuthKeyRequest() +{} + +std::string CreateAuthKeyRequest::getBizType()const +{ + return bizType_; +} + +void CreateAuthKeyRequest::setBizType(const std::string& bizType) +{ + bizType_ = bizType; + setCoreParameter("BizType", bizType); +} + +std::string CreateAuthKeyRequest::getUserDeviceId()const +{ + return userDeviceId_; +} + +void CreateAuthKeyRequest::setUserDeviceId(const std::string& userDeviceId) +{ + userDeviceId_ = userDeviceId; + setCoreParameter("UserDeviceId", userDeviceId); +} + +std::string CreateAuthKeyRequest::getSourceIp()const +{ + return sourceIp_; +} + +void CreateAuthKeyRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setCoreParameter("SourceIp", sourceIp); +} + +bool CreateAuthKeyRequest::getTest()const +{ + return test_; +} + +void CreateAuthKeyRequest::setTest(bool test) +{ + test_ = test; + setCoreParameter("Test", test ? "true" : "false"); +} + +int CreateAuthKeyRequest::getAuthYears()const +{ + return authYears_; +} + +void CreateAuthKeyRequest::setAuthYears(int authYears) +{ + authYears_ = authYears; + setCoreParameter("AuthYears", std::to_string(authYears)); +} + +std::string CreateAuthKeyRequest::getLang()const +{ + return lang_; +} + +void CreateAuthKeyRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setCoreParameter("Lang", lang); +} + diff --git a/cloudauth/src/model/CreateAuthKeyResult.cc b/cloudauth/src/model/CreateAuthKeyResult.cc new file mode 100644 index 000000000..e7d8ef28b --- /dev/null +++ b/cloudauth/src/model/CreateAuthKeyResult.cc @@ -0,0 +1,52 @@ +/* + * 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::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +CreateAuthKeyResult::CreateAuthKeyResult() : + ServiceResult() +{} + +CreateAuthKeyResult::CreateAuthKeyResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateAuthKeyResult::~CreateAuthKeyResult() +{} + +void CreateAuthKeyResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["AuthKey"].isNull()) + authKey_ = value["AuthKey"].asString(); + +} + +std::string CreateAuthKeyResult::getAuthKey()const +{ + return authKey_; +} + diff --git a/cloudauth/src/model/CreateVerifySDKRequest.cc b/cloudauth/src/model/CreateVerifySDKRequest.cc new file mode 100644 index 000000000..eedc74923 --- /dev/null +++ b/cloudauth/src/model/CreateVerifySDKRequest.cc @@ -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 + +using AlibabaCloud::Cloudauth::Model::CreateVerifySDKRequest; + +CreateVerifySDKRequest::CreateVerifySDKRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "CreateVerifySDK") +{} + +CreateVerifySDKRequest::~CreateVerifySDKRequest() +{} + +std::string CreateVerifySDKRequest::getSourceIp()const +{ + return sourceIp_; +} + +void CreateVerifySDKRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setCoreParameter("SourceIp", sourceIp); +} + +std::string CreateVerifySDKRequest::getAppUrl()const +{ + return appUrl_; +} + +void CreateVerifySDKRequest::setAppUrl(const std::string& appUrl) +{ + appUrl_ = appUrl; + setCoreParameter("AppUrl", appUrl); +} + +std::string CreateVerifySDKRequest::getLang()const +{ + return lang_; +} + +void CreateVerifySDKRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setCoreParameter("Lang", lang); +} + +std::string CreateVerifySDKRequest::getPlatform()const +{ + return platform_; +} + +void CreateVerifySDKRequest::setPlatform(const std::string& platform) +{ + platform_ = platform; + setCoreParameter("Platform", platform); +} + diff --git a/cloudauth/src/model/CreateVerifySDKResult.cc b/cloudauth/src/model/CreateVerifySDKResult.cc new file mode 100644 index 000000000..4b5dcd7f5 --- /dev/null +++ b/cloudauth/src/model/CreateVerifySDKResult.cc @@ -0,0 +1,52 @@ +/* + * 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::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +CreateVerifySDKResult::CreateVerifySDKResult() : + ServiceResult() +{} + +CreateVerifySDKResult::CreateVerifySDKResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateVerifySDKResult::~CreateVerifySDKResult() +{} + +void CreateVerifySDKResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["TaskId"].isNull()) + taskId_ = value["TaskId"].asString(); + +} + +std::string CreateVerifySDKResult::getTaskId()const +{ + return taskId_; +} + diff --git a/cloudauth/src/model/DescribeDeviceInfoRequest.cc b/cloudauth/src/model/DescribeDeviceInfoRequest.cc new file mode 100644 index 000000000..aa2223c10 --- /dev/null +++ b/cloudauth/src/model/DescribeDeviceInfoRequest.cc @@ -0,0 +1,137 @@ +/* + * 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::Cloudauth::Model::DescribeDeviceInfoRequest; + +DescribeDeviceInfoRequest::DescribeDeviceInfoRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "DescribeDeviceInfo") +{} + +DescribeDeviceInfoRequest::~DescribeDeviceInfoRequest() +{} + +std::string DescribeDeviceInfoRequest::getBizType()const +{ + return bizType_; +} + +void DescribeDeviceInfoRequest::setBizType(const std::string& bizType) +{ + bizType_ = bizType; + setCoreParameter("BizType", bizType); +} + +std::string DescribeDeviceInfoRequest::getUserDeviceId()const +{ + return userDeviceId_; +} + +void DescribeDeviceInfoRequest::setUserDeviceId(const std::string& userDeviceId) +{ + userDeviceId_ = userDeviceId; + setCoreParameter("UserDeviceId", userDeviceId); +} + +int DescribeDeviceInfoRequest::getTotalCount()const +{ + return totalCount_; +} + +void DescribeDeviceInfoRequest::setTotalCount(int totalCount) +{ + totalCount_ = totalCount; + setCoreParameter("TotalCount", std::to_string(totalCount)); +} + +std::string DescribeDeviceInfoRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeDeviceInfoRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setCoreParameter("SourceIp", sourceIp); +} + +int DescribeDeviceInfoRequest::getPageSize()const +{ + return pageSize_; +} + +void DescribeDeviceInfoRequest::setPageSize(int pageSize) +{ + pageSize_ = pageSize; + setCoreParameter("PageSize", std::to_string(pageSize)); +} + +int DescribeDeviceInfoRequest::getCurrentPage()const +{ + return currentPage_; +} + +void DescribeDeviceInfoRequest::setCurrentPage(int currentPage) +{ + currentPage_ = currentPage; + setCoreParameter("CurrentPage", std::to_string(currentPage)); +} + +std::string DescribeDeviceInfoRequest::getLang()const +{ + return lang_; +} + +void DescribeDeviceInfoRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setCoreParameter("Lang", lang); +} + +std::string DescribeDeviceInfoRequest::getExpiredEndDay()const +{ + return expiredEndDay_; +} + +void DescribeDeviceInfoRequest::setExpiredEndDay(const std::string& expiredEndDay) +{ + expiredEndDay_ = expiredEndDay; + setCoreParameter("ExpiredEndDay", expiredEndDay); +} + +std::string DescribeDeviceInfoRequest::getDeviceId()const +{ + return deviceId_; +} + +void DescribeDeviceInfoRequest::setDeviceId(const std::string& deviceId) +{ + deviceId_ = deviceId; + setCoreParameter("DeviceId", deviceId); +} + +std::string DescribeDeviceInfoRequest::getExpiredStartDay()const +{ + return expiredStartDay_; +} + +void DescribeDeviceInfoRequest::setExpiredStartDay(const std::string& expiredStartDay) +{ + expiredStartDay_ = expiredStartDay; + setCoreParameter("ExpiredStartDay", expiredStartDay); +} + diff --git a/cloudauth/src/model/DescribeDeviceInfoResult.cc b/cloudauth/src/model/DescribeDeviceInfoResult.cc new file mode 100644 index 000000000..758998bb1 --- /dev/null +++ b/cloudauth/src/model/DescribeDeviceInfoResult.cc @@ -0,0 +1,87 @@ +/* + * 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::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +DescribeDeviceInfoResult::DescribeDeviceInfoResult() : + ServiceResult() +{} + +DescribeDeviceInfoResult::DescribeDeviceInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeDeviceInfoResult::~DescribeDeviceInfoResult() +{} + +void DescribeDeviceInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto allDeviceInfoList = value["DeviceInfoList"]["DeviceInfo"]; + for (auto value : allDeviceInfoList) + { + DeviceInfo deviceInfoListObject; + if(!value["DeviceId"].isNull()) + deviceInfoListObject.deviceId = value["DeviceId"].asString(); + if(!value["UserDeviceId"].isNull()) + deviceInfoListObject.userDeviceId = value["UserDeviceId"].asString(); + if(!value["BizType"].isNull()) + deviceInfoListObject.bizType = value["BizType"].asString(); + if(!value["BeginDay"].isNull()) + deviceInfoListObject.beginDay = value["BeginDay"].asString(); + if(!value["ExpiredDay"].isNull()) + deviceInfoListObject.expiredDay = value["ExpiredDay"].asString(); + deviceInfoList_.push_back(deviceInfoListObject); + } + if(!value["PageSize"].isNull()) + pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["CurrentPage"].isNull()) + currentPage_ = std::stoi(value["CurrentPage"].asString()); + if(!value["TotalCount"].isNull()) + totalCount_ = std::stoi(value["TotalCount"].asString()); + +} + +std::vector DescribeDeviceInfoResult::getDeviceInfoList()const +{ + return deviceInfoList_; +} + +int DescribeDeviceInfoResult::getTotalCount()const +{ + return totalCount_; +} + +int DescribeDeviceInfoResult::getPageSize()const +{ + return pageSize_; +} + +int DescribeDeviceInfoResult::getCurrentPage()const +{ + return currentPage_; +} + diff --git a/cloudauth/src/model/DescribeVerifySDKRequest.cc b/cloudauth/src/model/DescribeVerifySDKRequest.cc new file mode 100644 index 000000000..58612b5c2 --- /dev/null +++ b/cloudauth/src/model/DescribeVerifySDKRequest.cc @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Cloudauth::Model::DescribeVerifySDKRequest; + +DescribeVerifySDKRequest::DescribeVerifySDKRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "DescribeVerifySDK") +{} + +DescribeVerifySDKRequest::~DescribeVerifySDKRequest() +{} + +std::string DescribeVerifySDKRequest::getSourceIp()const +{ + return sourceIp_; +} + +void DescribeVerifySDKRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setCoreParameter("SourceIp", sourceIp); +} + +std::string DescribeVerifySDKRequest::getLang()const +{ + return lang_; +} + +void DescribeVerifySDKRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setCoreParameter("Lang", lang); +} + +std::string DescribeVerifySDKRequest::getTaskId()const +{ + return taskId_; +} + +void DescribeVerifySDKRequest::setTaskId(const std::string& taskId) +{ + taskId_ = taskId; + setCoreParameter("TaskId", taskId); +} + diff --git a/cloudauth/src/model/DescribeVerifySDKResult.cc b/cloudauth/src/model/DescribeVerifySDKResult.cc new file mode 100644 index 000000000..91fa1ad97 --- /dev/null +++ b/cloudauth/src/model/DescribeVerifySDKResult.cc @@ -0,0 +1,52 @@ +/* + * 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::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +DescribeVerifySDKResult::DescribeVerifySDKResult() : + ServiceResult() +{} + +DescribeVerifySDKResult::DescribeVerifySDKResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +DescribeVerifySDKResult::~DescribeVerifySDKResult() +{} + +void DescribeVerifySDKResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["SdkUrl"].isNull()) + sdkUrl_ = value["SdkUrl"].asString(); + +} + +std::string DescribeVerifySDKResult::getSdkUrl()const +{ + return sdkUrl_; +} + diff --git a/cloudauth/src/model/DetectFaceAttributesRequest.cc b/cloudauth/src/model/DetectFaceAttributesRequest.cc index e822dc4fa..fa1643267 100644 --- a/cloudauth/src/model/DetectFaceAttributesRequest.cc +++ b/cloudauth/src/model/DetectFaceAttributesRequest.cc @@ -33,7 +33,7 @@ int DetectFaceAttributesRequest::getMaxNumPhotosPerCategory()const void DetectFaceAttributesRequest::setMaxNumPhotosPerCategory(int maxNumPhotosPerCategory) { maxNumPhotosPerCategory_ = maxNumPhotosPerCategory; - setParameter("MaxNumPhotosPerCategory", std::to_string(maxNumPhotosPerCategory)); + setCoreParameter("MaxNumPhotosPerCategory", std::to_string(maxNumPhotosPerCategory)); } int DetectFaceAttributesRequest::getMaxFaceNum()const @@ -44,7 +44,7 @@ int DetectFaceAttributesRequest::getMaxFaceNum()const void DetectFaceAttributesRequest::setMaxFaceNum(int maxFaceNum) { maxFaceNum_ = maxFaceNum; - setParameter("MaxFaceNum", std::to_string(maxFaceNum)); + setCoreParameter("MaxFaceNum", std::to_string(maxFaceNum)); } long DetectFaceAttributesRequest::getResourceOwnerId()const @@ -55,7 +55,7 @@ long DetectFaceAttributesRequest::getResourceOwnerId()const void DetectFaceAttributesRequest::setResourceOwnerId(long resourceOwnerId) { resourceOwnerId_ = resourceOwnerId; - setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } std::string DetectFaceAttributesRequest::getSourceIp()const @@ -66,7 +66,7 @@ std::string DetectFaceAttributesRequest::getSourceIp()const void DetectFaceAttributesRequest::setSourceIp(const std::string& sourceIp) { sourceIp_ = sourceIp; - setParameter("SourceIp", sourceIp); + setCoreParameter("SourceIp", sourceIp); } std::string DetectFaceAttributesRequest::getRetAttributes()const @@ -77,7 +77,7 @@ std::string DetectFaceAttributesRequest::getRetAttributes()const void DetectFaceAttributesRequest::setRetAttributes(const std::string& retAttributes) { retAttributes_ = retAttributes; - setParameter("RetAttributes", retAttributes); + setCoreParameter("RetAttributes", retAttributes); } std::string DetectFaceAttributesRequest::getMaterialValue()const @@ -88,7 +88,7 @@ std::string DetectFaceAttributesRequest::getMaterialValue()const void DetectFaceAttributesRequest::setMaterialValue(const std::string& materialValue) { materialValue_ = materialValue; - setParameter("MaterialValue", materialValue); + setCoreParameter("MaterialValue", materialValue); } bool DetectFaceAttributesRequest::getDontSaveDB()const @@ -99,7 +99,7 @@ bool DetectFaceAttributesRequest::getDontSaveDB()const void DetectFaceAttributesRequest::setDontSaveDB(bool dontSaveDB) { dontSaveDB_ = dontSaveDB; - setParameter("DontSaveDB", std::to_string(dontSaveDB)); + setCoreParameter("DontSaveDB", dontSaveDB ? "true" : "false"); } std::string DetectFaceAttributesRequest::getClientTag()const @@ -110,6 +110,6 @@ std::string DetectFaceAttributesRequest::getClientTag()const void DetectFaceAttributesRequest::setClientTag(const std::string& clientTag) { clientTag_ = clientTag; - setParameter("ClientTag", clientTag); + setCoreParameter("ClientTag", clientTag); } diff --git a/cloudauth/src/model/GetMaterialsRequest.cc b/cloudauth/src/model/GetMaterialsRequest.cc index 3ee0f944a..039a01935 100644 --- a/cloudauth/src/model/GetMaterialsRequest.cc +++ b/cloudauth/src/model/GetMaterialsRequest.cc @@ -33,7 +33,7 @@ long GetMaterialsRequest::getResourceOwnerId()const void GetMaterialsRequest::setResourceOwnerId(long resourceOwnerId) { resourceOwnerId_ = resourceOwnerId; - setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } std::string GetMaterialsRequest::getBiz()const @@ -44,7 +44,7 @@ std::string GetMaterialsRequest::getBiz()const void GetMaterialsRequest::setBiz(const std::string& biz) { biz_ = biz; - setParameter("Biz", biz); + setCoreParameter("Biz", biz); } std::string GetMaterialsRequest::getSourceIp()const @@ -55,7 +55,7 @@ std::string GetMaterialsRequest::getSourceIp()const void GetMaterialsRequest::setSourceIp(const std::string& sourceIp) { sourceIp_ = sourceIp; - setParameter("SourceIp", sourceIp); + setCoreParameter("SourceIp", sourceIp); } std::string GetMaterialsRequest::getTicketId()const @@ -66,6 +66,6 @@ std::string GetMaterialsRequest::getTicketId()const void GetMaterialsRequest::setTicketId(const std::string& ticketId) { ticketId_ = ticketId; - setParameter("TicketId", ticketId); + setCoreParameter("TicketId", ticketId); } diff --git a/cloudauth/src/model/GetStatusRequest.cc b/cloudauth/src/model/GetStatusRequest.cc index 4f13a195d..d628075e6 100644 --- a/cloudauth/src/model/GetStatusRequest.cc +++ b/cloudauth/src/model/GetStatusRequest.cc @@ -33,7 +33,7 @@ long GetStatusRequest::getResourceOwnerId()const void GetStatusRequest::setResourceOwnerId(long resourceOwnerId) { resourceOwnerId_ = resourceOwnerId; - setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } std::string GetStatusRequest::getBiz()const @@ -44,7 +44,7 @@ std::string GetStatusRequest::getBiz()const void GetStatusRequest::setBiz(const std::string& biz) { biz_ = biz; - setParameter("Biz", biz); + setCoreParameter("Biz", biz); } std::string GetStatusRequest::getSourceIp()const @@ -55,7 +55,7 @@ std::string GetStatusRequest::getSourceIp()const void GetStatusRequest::setSourceIp(const std::string& sourceIp) { sourceIp_ = sourceIp; - setParameter("SourceIp", sourceIp); + setCoreParameter("SourceIp", sourceIp); } std::string GetStatusRequest::getTicketId()const @@ -66,6 +66,6 @@ std::string GetStatusRequest::getTicketId()const void GetStatusRequest::setTicketId(const std::string& ticketId) { ticketId_ = ticketId; - setParameter("TicketId", ticketId); + setCoreParameter("TicketId", ticketId); } diff --git a/cloudauth/src/model/GetStatusResult.cc b/cloudauth/src/model/GetStatusResult.cc index b2967881f..8d5ad36c7 100644 --- a/cloudauth/src/model/GetStatusResult.cc +++ b/cloudauth/src/model/GetStatusResult.cc @@ -49,6 +49,8 @@ void GetStatusResult::parse(const std::string &payload) data_.similarityScore = std::stof(dataNode["SimilarityScore"].asString()); if(!dataNode["AuditConclusions"].isNull()) data_.auditConclusions = dataNode["AuditConclusions"].asString(); + if(!dataNode["AuthorityComparisonScore"].isNull()) + data_.authorityComparisonScore = std::stof(dataNode["AuthorityComparisonScore"].asString()); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; if(!value["Code"].isNull()) diff --git a/cloudauth/src/model/GetVerifyTokenRequest.cc b/cloudauth/src/model/GetVerifyTokenRequest.cc index bdcbc5c6b..f92a524a8 100644 --- a/cloudauth/src/model/GetVerifyTokenRequest.cc +++ b/cloudauth/src/model/GetVerifyTokenRequest.cc @@ -33,7 +33,7 @@ std::string GetVerifyTokenRequest::getUserData()const void GetVerifyTokenRequest::setUserData(const std::string& userData) { userData_ = userData; - setParameter("UserData", userData); + setCoreParameter("UserData", userData); } long GetVerifyTokenRequest::getResourceOwnerId()const @@ -44,7 +44,7 @@ long GetVerifyTokenRequest::getResourceOwnerId()const void GetVerifyTokenRequest::setResourceOwnerId(long resourceOwnerId) { resourceOwnerId_ = resourceOwnerId; - setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } std::string GetVerifyTokenRequest::getBiz()const @@ -55,7 +55,7 @@ std::string GetVerifyTokenRequest::getBiz()const void GetVerifyTokenRequest::setBiz(const std::string& biz) { biz_ = biz; - setParameter("Biz", biz); + setCoreParameter("Biz", biz); } std::string GetVerifyTokenRequest::getSourceIp()const @@ -66,7 +66,7 @@ std::string GetVerifyTokenRequest::getSourceIp()const void GetVerifyTokenRequest::setSourceIp(const std::string& sourceIp) { sourceIp_ = sourceIp; - setParameter("SourceIp", sourceIp); + setCoreParameter("SourceIp", sourceIp); } std::string GetVerifyTokenRequest::getBinding()const @@ -77,7 +77,7 @@ std::string GetVerifyTokenRequest::getBinding()const void GetVerifyTokenRequest::setBinding(const std::string& binding) { binding_ = binding; - setParameter("Binding", binding); + setCoreParameter("Binding", binding); } std::string GetVerifyTokenRequest::getVerifyConfigs()const @@ -88,7 +88,7 @@ std::string GetVerifyTokenRequest::getVerifyConfigs()const void GetVerifyTokenRequest::setVerifyConfigs(const std::string& verifyConfigs) { verifyConfigs_ = verifyConfigs; - setParameter("VerifyConfigs", verifyConfigs); + setCoreParameter("VerifyConfigs", verifyConfigs); } std::string GetVerifyTokenRequest::getTicketId()const @@ -99,6 +99,6 @@ std::string GetVerifyTokenRequest::getTicketId()const void GetVerifyTokenRequest::setTicketId(const std::string& ticketId) { ticketId_ = ticketId; - setParameter("TicketId", ticketId); + setCoreParameter("TicketId", ticketId); } diff --git a/cloudauth/src/model/ModifyDeviceInfoRequest.cc b/cloudauth/src/model/ModifyDeviceInfoRequest.cc new file mode 100644 index 000000000..5978efa66 --- /dev/null +++ b/cloudauth/src/model/ModifyDeviceInfoRequest.cc @@ -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 + +using AlibabaCloud::Cloudauth::Model::ModifyDeviceInfoRequest; + +ModifyDeviceInfoRequest::ModifyDeviceInfoRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "ModifyDeviceInfo") +{} + +ModifyDeviceInfoRequest::~ModifyDeviceInfoRequest() +{} + +std::string ModifyDeviceInfoRequest::getUserDeviceId()const +{ + return userDeviceId_; +} + +void ModifyDeviceInfoRequest::setUserDeviceId(const std::string& userDeviceId) +{ + userDeviceId_ = userDeviceId; + setCoreParameter("UserDeviceId", userDeviceId); +} + +std::string ModifyDeviceInfoRequest::getBizType()const +{ + return bizType_; +} + +void ModifyDeviceInfoRequest::setBizType(const std::string& bizType) +{ + bizType_ = bizType; + setCoreParameter("BizType", bizType); +} + +std::string ModifyDeviceInfoRequest::getDuration()const +{ + return duration_; +} + +void ModifyDeviceInfoRequest::setDuration(const std::string& duration) +{ + duration_ = duration; + setCoreParameter("Duration", duration); +} + +std::string ModifyDeviceInfoRequest::getExpiredDay()const +{ + return expiredDay_; +} + +void ModifyDeviceInfoRequest::setExpiredDay(const std::string& expiredDay) +{ + expiredDay_ = expiredDay; + setCoreParameter("ExpiredDay", expiredDay); +} + +std::string ModifyDeviceInfoRequest::getSourceIp()const +{ + return sourceIp_; +} + +void ModifyDeviceInfoRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setCoreParameter("SourceIp", sourceIp); +} + +std::string ModifyDeviceInfoRequest::getLang()const +{ + return lang_; +} + +void ModifyDeviceInfoRequest::setLang(const std::string& lang) +{ + lang_ = lang; + setCoreParameter("Lang", lang); +} + +std::string ModifyDeviceInfoRequest::getDeviceId()const +{ + return deviceId_; +} + +void ModifyDeviceInfoRequest::setDeviceId(const std::string& deviceId) +{ + deviceId_ = deviceId; + setCoreParameter("DeviceId", deviceId); +} + diff --git a/cloudauth/src/model/ModifyDeviceInfoResult.cc b/cloudauth/src/model/ModifyDeviceInfoResult.cc new file mode 100644 index 000000000..5d98388f5 --- /dev/null +++ b/cloudauth/src/model/ModifyDeviceInfoResult.cc @@ -0,0 +1,80 @@ +/* + * 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::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +ModifyDeviceInfoResult::ModifyDeviceInfoResult() : + ServiceResult() +{} + +ModifyDeviceInfoResult::ModifyDeviceInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ModifyDeviceInfoResult::~ModifyDeviceInfoResult() +{} + +void ModifyDeviceInfoResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["DeviceId"].isNull()) + deviceId_ = value["DeviceId"].asString(); + if(!value["UserDeviceId"].isNull()) + userDeviceId_ = value["UserDeviceId"].asString(); + if(!value["BizType"].isNull()) + bizType_ = value["BizType"].asString(); + if(!value["BeginDay"].isNull()) + beginDay_ = value["BeginDay"].asString(); + if(!value["ExpiredDay"].isNull()) + expiredDay_ = value["ExpiredDay"].asString(); + +} + +std::string ModifyDeviceInfoResult::getExpiredDay()const +{ + return expiredDay_; +} + +std::string ModifyDeviceInfoResult::getBeginDay()const +{ + return beginDay_; +} + +std::string ModifyDeviceInfoResult::getDeviceId()const +{ + return deviceId_; +} + +std::string ModifyDeviceInfoResult::getBizType()const +{ + return bizType_; +} + +std::string ModifyDeviceInfoResult::getUserDeviceId()const +{ + return userDeviceId_; +} + diff --git a/cloudauth/src/model/SubmitMaterialsRequest.cc b/cloudauth/src/model/SubmitMaterialsRequest.cc index ffcd06660..7ccadcd9f 100644 --- a/cloudauth/src/model/SubmitMaterialsRequest.cc +++ b/cloudauth/src/model/SubmitMaterialsRequest.cc @@ -33,7 +33,7 @@ long SubmitMaterialsRequest::getResourceOwnerId()const void SubmitMaterialsRequest::setResourceOwnerId(long resourceOwnerId) { resourceOwnerId_ = resourceOwnerId; - setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); } std::string SubmitMaterialsRequest::getSourceIp()const @@ -44,7 +44,7 @@ std::string SubmitMaterialsRequest::getSourceIp()const void SubmitMaterialsRequest::setSourceIp(const std::string& sourceIp) { sourceIp_ = sourceIp; - setParameter("SourceIp", sourceIp); + setCoreParameter("SourceIp", sourceIp); } std::vector SubmitMaterialsRequest::getMaterial()const @@ -59,8 +59,8 @@ void SubmitMaterialsRequest::setMaterial(const std::vector& material) for(int i = 0; i!= material.size(); i++) { auto obj = material.at(i); std::string str ="Material."+ std::to_string(i); - setParameter(str + ".MaterialType", obj.materialType); - setParameter(str + ".Value", obj.value); + setCoreParameter(str + ".MaterialType", obj.materialType); + setCoreParameter(str + ".Value", obj.value); } } @@ -72,6 +72,6 @@ std::string SubmitMaterialsRequest::getVerifyToken()const void SubmitMaterialsRequest::setVerifyToken(const std::string& verifyToken) { verifyToken_ = verifyToken; - setParameter("VerifyToken", verifyToken); + setCoreParameter("VerifyToken", verifyToken); } diff --git a/cloudauth/src/model/SubmitMaterialsResult.cc b/cloudauth/src/model/SubmitMaterialsResult.cc index 2d513631a..8d404e178 100644 --- a/cloudauth/src/model/SubmitMaterialsResult.cc +++ b/cloudauth/src/model/SubmitMaterialsResult.cc @@ -50,6 +50,8 @@ void SubmitMaterialsResult::parse(const std::string &payload) data_.verifyStatus.similarityScore = std::stof(verifyStatusNode["SimilarityScore"].asString()); if(!verifyStatusNode["AuditConclusions"].isNull()) data_.verifyStatus.auditConclusions = verifyStatusNode["AuditConclusions"].asString(); + if(!verifyStatusNode["AuthorityComparisonScore"].isNull()) + data_.verifyStatus.authorityComparisonScore = std::stof(verifyStatusNode["AuthorityComparisonScore"].asString()); if(!value["Success"].isNull()) success_ = value["Success"].asString() == "true"; if(!value["Code"].isNull()) diff --git a/cloudauth/src/model/SubmitVerificationRequest.cc b/cloudauth/src/model/SubmitVerificationRequest.cc new file mode 100644 index 000000000..df5580b67 --- /dev/null +++ b/cloudauth/src/model/SubmitVerificationRequest.cc @@ -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 + +using AlibabaCloud::Cloudauth::Model::SubmitVerificationRequest; + +SubmitVerificationRequest::SubmitVerificationRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "SubmitVerification") +{} + +SubmitVerificationRequest::~SubmitVerificationRequest() +{} + +long SubmitVerificationRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void SubmitVerificationRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string SubmitVerificationRequest::getBiz()const +{ + return biz_; +} + +void SubmitVerificationRequest::setBiz(const std::string& biz) +{ + biz_ = biz; + setCoreParameter("Biz", biz); +} + +std::string SubmitVerificationRequest::getSourceIp()const +{ + return sourceIp_; +} + +void SubmitVerificationRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setCoreParameter("SourceIp", sourceIp); +} + +std::vector SubmitVerificationRequest::getMaterial()const +{ + return material_; +} + +void SubmitVerificationRequest::setMaterial(const std::vector& material) +{ + material_ = material; + int i = 0; + for(int i = 0; i!= material.size(); i++) { + auto obj = material.at(i); + std::string str ="Material."+ std::to_string(i); + setCoreParameter(str + ".MaterialType", obj.materialType); + setCoreParameter(str + ".Value", obj.value); + } +} + +std::string SubmitVerificationRequest::getTicketId()const +{ + return ticketId_; +} + +void SubmitVerificationRequest::setTicketId(const std::string& ticketId) +{ + ticketId_ = ticketId; + setCoreParameter("TicketId", ticketId); +} + diff --git a/cloudauth/src/model/SubmitVerificationResult.cc b/cloudauth/src/model/SubmitVerificationResult.cc new file mode 100644 index 000000000..bdb049f7a --- /dev/null +++ b/cloudauth/src/model/SubmitVerificationResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +SubmitVerificationResult::SubmitVerificationResult() : + ServiceResult() +{} + +SubmitVerificationResult::SubmitVerificationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SubmitVerificationResult::~SubmitVerificationResult() +{} + +void SubmitVerificationResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + auto verifyStatusNode = dataNode["VerifyStatus"]; + if(!verifyStatusNode["StatusCode"].isNull()) + data_.verifyStatus.statusCode = std::stoi(verifyStatusNode["StatusCode"].asString()); + if(!verifyStatusNode["TrustedScore"].isNull()) + data_.verifyStatus.trustedScore = std::stof(verifyStatusNode["TrustedScore"].asString()); + if(!verifyStatusNode["SimilarityScore"].isNull()) + data_.verifyStatus.similarityScore = std::stof(verifyStatusNode["SimilarityScore"].asString()); + if(!verifyStatusNode["AuditConclusions"].isNull()) + data_.verifyStatus.auditConclusions = verifyStatusNode["AuditConclusions"].asString(); + if(!verifyStatusNode["AuthorityComparisonScore"].isNull()) + data_.verifyStatus.authorityComparisonScore = std::stof(verifyStatusNode["AuthorityComparisonScore"].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(); + +} + +std::string SubmitVerificationResult::getMessage()const +{ + return message_; +} + +SubmitVerificationResult::Data SubmitVerificationResult::getData()const +{ + return data_; +} + +std::string SubmitVerificationResult::getCode()const +{ + return code_; +} + +bool SubmitVerificationResult::getSuccess()const +{ + return success_; +} +