diff --git a/CHANGELOG b/CHANGELOG index a3cd3daa3..5a125bc56 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-05-13 Version: 1.36.405 +- About 2019-03-07 and 2018-09-16 Version. + 2020-05-12 Version: 1.36.404 - Supported DRM. diff --git a/VERSION b/VERSION index 11311d36b..1cf8d17bc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.404 \ No newline at end of file +1.36.405 \ No newline at end of file diff --git a/cloudauth/CMakeLists.txt b/cloudauth/CMakeLists.txt index 34e6fcfa4..9ce7fb0b4 100644 --- a/cloudauth/CMakeLists.txt +++ b/cloudauth/CMakeLists.txt @@ -69,12 +69,22 @@ set(cloudauth_public_header_model include/alibabacloud/cloudauth/model/DescribeVerifyUsageResult.h include/alibabacloud/cloudauth/model/DetectFaceAttributesRequest.h include/alibabacloud/cloudauth/model/DetectFaceAttributesResult.h + include/alibabacloud/cloudauth/model/GetMaterialsRequest.h + include/alibabacloud/cloudauth/model/GetMaterialsResult.h + include/alibabacloud/cloudauth/model/GetStatusRequest.h + include/alibabacloud/cloudauth/model/GetStatusResult.h + include/alibabacloud/cloudauth/model/GetVerifyTokenRequest.h + include/alibabacloud/cloudauth/model/GetVerifyTokenResult.h include/alibabacloud/cloudauth/model/InitDeviceRequest.h include/alibabacloud/cloudauth/model/InitDeviceResult.h include/alibabacloud/cloudauth/model/InitFaceVerifyRequest.h include/alibabacloud/cloudauth/model/InitFaceVerifyResult.h include/alibabacloud/cloudauth/model/ModifyDeviceInfoRequest.h include/alibabacloud/cloudauth/model/ModifyDeviceInfoResult.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/UpdateAppPackageRequest.h include/alibabacloud/cloudauth/model/UpdateAppPackageResult.h include/alibabacloud/cloudauth/model/UpdateVerifySettingRequest.h @@ -134,12 +144,22 @@ set(cloudauth_src src/model/DescribeVerifyUsageResult.cc src/model/DetectFaceAttributesRequest.cc src/model/DetectFaceAttributesResult.cc + src/model/GetMaterialsRequest.cc + src/model/GetMaterialsResult.cc + src/model/GetStatusRequest.cc + src/model/GetStatusResult.cc + src/model/GetVerifyTokenRequest.cc + src/model/GetVerifyTokenResult.cc src/model/InitDeviceRequest.cc src/model/InitDeviceResult.cc src/model/InitFaceVerifyRequest.cc src/model/InitFaceVerifyResult.cc src/model/ModifyDeviceInfoRequest.cc src/model/ModifyDeviceInfoResult.cc + src/model/SubmitMaterialsRequest.cc + src/model/SubmitMaterialsResult.cc + src/model/SubmitVerificationRequest.cc + src/model/SubmitVerificationResult.cc src/model/UpdateAppPackageRequest.cc src/model/UpdateAppPackageResult.cc src/model/UpdateVerifySettingRequest.cc diff --git a/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h b/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h index 6c9bf30ea..e3c594c67 100644 --- a/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h +++ b/cloudauth/include/alibabacloud/cloudauth/CloudauthClient.h @@ -70,12 +70,22 @@ #include "model/DescribeVerifyUsageResult.h" #include "model/DetectFaceAttributesRequest.h" #include "model/DetectFaceAttributesResult.h" +#include "model/GetMaterialsRequest.h" +#include "model/GetMaterialsResult.h" +#include "model/GetStatusRequest.h" +#include "model/GetStatusResult.h" +#include "model/GetVerifyTokenRequest.h" +#include "model/GetVerifyTokenResult.h" #include "model/InitDeviceRequest.h" #include "model/InitDeviceResult.h" #include "model/InitFaceVerifyRequest.h" #include "model/InitFaceVerifyResult.h" #include "model/ModifyDeviceInfoRequest.h" #include "model/ModifyDeviceInfoResult.h" +#include "model/SubmitMaterialsRequest.h" +#include "model/SubmitMaterialsResult.h" +#include "model/SubmitVerificationRequest.h" +#include "model/SubmitVerificationResult.h" #include "model/UpdateAppPackageRequest.h" #include "model/UpdateAppPackageResult.h" #include "model/UpdateVerifySettingRequest.h" @@ -165,6 +175,15 @@ namespace AlibabaCloud typedef Outcome DetectFaceAttributesOutcome; typedef std::future DetectFaceAttributesOutcomeCallable; typedef std::function&)> DetectFaceAttributesAsyncHandler; + typedef Outcome GetMaterialsOutcome; + typedef std::future GetMaterialsOutcomeCallable; + typedef std::function&)> GetMaterialsAsyncHandler; + typedef Outcome GetStatusOutcome; + typedef std::future GetStatusOutcomeCallable; + typedef std::function&)> GetStatusAsyncHandler; + typedef Outcome GetVerifyTokenOutcome; + typedef std::future GetVerifyTokenOutcomeCallable; + typedef std::function&)> GetVerifyTokenAsyncHandler; typedef Outcome InitDeviceOutcome; typedef std::future InitDeviceOutcomeCallable; typedef std::function&)> InitDeviceAsyncHandler; @@ -174,6 +193,12 @@ namespace AlibabaCloud typedef Outcome ModifyDeviceInfoOutcome; typedef std::future ModifyDeviceInfoOutcomeCallable; typedef std::function&)> ModifyDeviceInfoAsyncHandler; + typedef Outcome SubmitMaterialsOutcome; + typedef std::future SubmitMaterialsOutcomeCallable; + typedef std::function&)> SubmitMaterialsAsyncHandler; + typedef Outcome SubmitVerificationOutcome; + typedef std::future SubmitVerificationOutcomeCallable; + typedef std::function&)> SubmitVerificationAsyncHandler; typedef Outcome UpdateAppPackageOutcome; typedef std::future UpdateAppPackageOutcomeCallable; typedef std::function&)> UpdateAppPackageAsyncHandler; @@ -263,6 +288,15 @@ namespace AlibabaCloud DetectFaceAttributesOutcome detectFaceAttributes(const Model::DetectFaceAttributesRequest &request)const; void detectFaceAttributesAsync(const Model::DetectFaceAttributesRequest& request, const DetectFaceAttributesAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DetectFaceAttributesOutcomeCallable detectFaceAttributesCallable(const Model::DetectFaceAttributesRequest& 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; + 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; + GetVerifyTokenOutcome getVerifyToken(const Model::GetVerifyTokenRequest &request)const; + void getVerifyTokenAsync(const Model::GetVerifyTokenRequest& request, const GetVerifyTokenAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetVerifyTokenOutcomeCallable getVerifyTokenCallable(const Model::GetVerifyTokenRequest& request) const; InitDeviceOutcome initDevice(const Model::InitDeviceRequest &request)const; void initDeviceAsync(const Model::InitDeviceRequest& request, const InitDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; InitDeviceOutcomeCallable initDeviceCallable(const Model::InitDeviceRequest& request) const; @@ -272,6 +306,12 @@ namespace AlibabaCloud 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; + 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; UpdateAppPackageOutcome updateAppPackage(const Model::UpdateAppPackageRequest &request)const; void updateAppPackageAsync(const Model::UpdateAppPackageRequest& request, const UpdateAppPackageAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateAppPackageOutcomeCallable updateAppPackageCallable(const Model::UpdateAppPackageRequest& request) const; diff --git a/cloudauth/include/alibabacloud/cloudauth/model/GetMaterialsRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/GetMaterialsRequest.h new file mode 100644 index 000000000..cfe3a9be7 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetMaterialsRequest.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_GETMATERIALSREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_GETMATERIALSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT GetMaterialsRequest : public RpcServiceRequest + { + + public: + GetMaterialsRequest(); + ~GetMaterialsRequest(); + + 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::string getTicketId()const; + void setTicketId(const std::string& ticketId); + + private: + long resourceOwnerId_; + std::string biz_; + std::string sourceIp_; + std::string ticketId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_GETMATERIALSREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/GetMaterialsResult.h b/cloudauth/include/alibabacloud/cloudauth/model/GetMaterialsResult.h new file mode 100644 index 000000000..dcc57d370 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetMaterialsResult.h @@ -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. + */ + +#ifndef ALIBABACLOUD_CLOUDAUTH_MODEL_GETMATERIALSRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_GETMATERIALSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT GetMaterialsResult : public ServiceResult + { + public: + struct Data + { + std::string facePic; + std::string identificationNumber; + std::string idCardStartDate; + std::string address; + std::string idCardFrontPic; + std::string ethnicGroup; + std::string authority; + std::string sex; + std::string idCardExpiry; + std::string idCardType; + std::string idCardBackPic; + std::string name; + }; + + + GetMaterialsResult(); + explicit GetMaterialsResult(const std::string &payload); + ~GetMaterialsResult(); + 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_GETMATERIALSRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/GetStatusRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/GetStatusRequest.h new file mode 100644 index 000000000..5ed0c9910 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetStatusRequest.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_GETSTATUSREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_GETSTATUSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT GetStatusRequest : public RpcServiceRequest + { + + public: + GetStatusRequest(); + ~GetStatusRequest(); + + 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::string getTicketId()const; + void setTicketId(const std::string& ticketId); + + private: + long resourceOwnerId_; + std::string biz_; + std::string sourceIp_; + std::string ticketId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_GETSTATUSREQUEST_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 new file mode 100644 index 000000000..aaf8d3390 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetStatusResult.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_GETSTATUSRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_GETSTATUSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT GetStatusResult : public ServiceResult + { + public: + struct Data + { + std::string auditConclusions; + float trustedScore; + float authorityComparisonScore; + float similarityScore; + int statusCode; + }; + + + GetStatusResult(); + explicit GetStatusResult(const std::string &payload); + ~GetStatusResult(); + 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_GETSTATUSRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/GetVerifyTokenRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/GetVerifyTokenRequest.h new file mode 100644 index 000000000..1bd968d52 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetVerifyTokenRequest.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_GETVERIFYTOKENREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_GETVERIFYTOKENREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT GetVerifyTokenRequest : public RpcServiceRequest + { + + public: + GetVerifyTokenRequest(); + ~GetVerifyTokenRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getBinding()const; + void setBinding(const std::string& binding); + std::string getVerifyConfigs()const; + void setVerifyConfigs(const std::string& verifyConfigs); + std::string getUserData()const; + void setUserData(const std::string& userData); + std::string getBiz()const; + void setBiz(const std::string& biz); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::string getTicketId()const; + void setTicketId(const std::string& ticketId); + + private: + long resourceOwnerId_; + std::string binding_; + std::string verifyConfigs_; + std::string userData_; + std::string biz_; + std::string sourceIp_; + std::string ticketId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_GETVERIFYTOKENREQUEST_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/GetVerifyTokenResult.h b/cloudauth/include/alibabacloud/cloudauth/model/GetVerifyTokenResult.h new file mode 100644 index 000000000..ad5b6e62e --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/GetVerifyTokenResult.h @@ -0,0 +1,78 @@ +/* + * 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_GETVERIFYTOKENRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_GETVERIFYTOKENRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT GetVerifyTokenResult : public ServiceResult + { + public: + struct Data + { + struct VerifyToken + { + std::string token; + int durationSeconds; + }; + struct StsToken + { + std::string path; + std::string bucketName; + std::string accessKeyId; + std::string accessKeySecret; + std::string expiration; + std::string token; + std::string endPoint; + }; + StsToken stsToken; + std::string cloudauthPageUrl; + VerifyToken verifyToken; + }; + + + GetVerifyTokenResult(); + explicit GetVerifyTokenResult(const std::string &payload); + ~GetVerifyTokenResult(); + 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_GETVERIFYTOKENRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsRequest.h new file mode 100644 index 000000000..21ea3a589 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsRequest.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_SUBMITMATERIALSREQUEST_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITMATERIALSREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT SubmitMaterialsRequest : public RpcServiceRequest + { + public: + struct Material + { + std::string materialType; + std::string value; + }; + + public: + SubmitMaterialsRequest(); + ~SubmitMaterialsRequest(); + + long getResourceOwnerId()const; + void setResourceOwnerId(long resourceOwnerId); + std::string getVerifyToken()const; + void setVerifyToken(const std::string& verifyToken); + std::string getSourceIp()const; + void setSourceIp(const std::string& sourceIp); + std::vector getMaterial()const; + void setMaterial(const std::vector& material); + + private: + long resourceOwnerId_; + std::string verifyToken_; + std::string sourceIp_; + std::vector material_; + + }; + } + } +} +#endif // !ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITMATERIALSREQUEST_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 new file mode 100644 index 000000000..c8e4361e5 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/SubmitMaterialsResult.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_SUBMITMATERIALSRESULT_H_ +#define ALIBABACLOUD_CLOUDAUTH_MODEL_SUBMITMATERIALSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Cloudauth + { + namespace Model + { + class ALIBABACLOUD_CLOUDAUTH_EXPORT SubmitMaterialsResult : public ServiceResult + { + public: + struct Data + { + struct VerifyStatus + { + std::string auditConclusions; + float trustedScore; + float authorityComparisonScore; + float similarityScore; + int statusCode; + }; + VerifyStatus verifyStatus; + }; + + + SubmitMaterialsResult(); + explicit SubmitMaterialsResult(const std::string &payload); + ~SubmitMaterialsResult(); + 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_SUBMITMATERIALSRESULT_H_ \ No newline at end of file diff --git a/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationRequest.h b/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationRequest.h new file mode 100644 index 000000000..add448638 --- /dev/null +++ b/cloudauth/include/alibabacloud/cloudauth/model/SubmitVerificationRequest.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_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 + { + public: + 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 24ff3951c..3dfe3e970 100644 --- a/cloudauth/src/CloudauthClient.cc +++ b/cloudauth/src/CloudauthClient.cc @@ -915,6 +915,114 @@ CloudauthClient::DetectFaceAttributesOutcomeCallable CloudauthClient::detectFace return task->get_future(); } +CloudauthClient::GetMaterialsOutcome CloudauthClient::getMaterials(const GetMaterialsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetMaterialsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetMaterialsOutcome(GetMaterialsResult(outcome.result())); + else + return GetMaterialsOutcome(outcome.error()); +} + +void CloudauthClient::getMaterialsAsync(const GetMaterialsRequest& request, const GetMaterialsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getMaterials(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::GetMaterialsOutcomeCallable CloudauthClient::getMaterialsCallable(const GetMaterialsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getMaterials(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CloudauthClient::GetStatusOutcome CloudauthClient::getStatus(const GetStatusRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetStatusOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetStatusOutcome(GetStatusResult(outcome.result())); + else + return GetStatusOutcome(outcome.error()); +} + +void CloudauthClient::getStatusAsync(const GetStatusRequest& request, const GetStatusAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getStatus(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::GetStatusOutcomeCallable CloudauthClient::getStatusCallable(const GetStatusRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getStatus(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + +CloudauthClient::GetVerifyTokenOutcome CloudauthClient::getVerifyToken(const GetVerifyTokenRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetVerifyTokenOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetVerifyTokenOutcome(GetVerifyTokenResult(outcome.result())); + else + return GetVerifyTokenOutcome(outcome.error()); +} + +void CloudauthClient::getVerifyTokenAsync(const GetVerifyTokenRequest& request, const GetVerifyTokenAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getVerifyToken(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::GetVerifyTokenOutcomeCallable CloudauthClient::getVerifyTokenCallable(const GetVerifyTokenRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getVerifyToken(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CloudauthClient::InitDeviceOutcome CloudauthClient::initDevice(const InitDeviceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1023,6 +1131,78 @@ CloudauthClient::ModifyDeviceInfoOutcomeCallable CloudauthClient::modifyDeviceIn return task->get_future(); } +CloudauthClient::SubmitMaterialsOutcome CloudauthClient::submitMaterials(const SubmitMaterialsRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return SubmitMaterialsOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return SubmitMaterialsOutcome(SubmitMaterialsResult(outcome.result())); + else + return SubmitMaterialsOutcome(outcome.error()); +} + +void CloudauthClient::submitMaterialsAsync(const SubmitMaterialsRequest& request, const SubmitMaterialsAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, submitMaterials(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CloudauthClient::SubmitMaterialsOutcomeCallable CloudauthClient::submitMaterialsCallable(const SubmitMaterialsRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->submitMaterials(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + 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::UpdateAppPackageOutcome CloudauthClient::updateAppPackage(const UpdateAppPackageRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/cloudauth/src/model/CompareFacesRequest.cc b/cloudauth/src/model/CompareFacesRequest.cc index 8ca440d72..ecf2108ec 100644 --- a/cloudauth/src/model/CompareFacesRequest.cc +++ b/cloudauth/src/model/CompareFacesRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::CompareFacesRequest; CompareFacesRequest::CompareFacesRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "CompareFaces") + RpcServiceRequest("cloudauth", "2018-09-16", "CompareFaces") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/CreateAuthKeyRequest.cc b/cloudauth/src/model/CreateAuthKeyRequest.cc index 19231333a..6cd1b1be9 100644 --- a/cloudauth/src/model/CreateAuthKeyRequest.cc +++ b/cloudauth/src/model/CreateAuthKeyRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::CreateAuthKeyRequest; CreateAuthKeyRequest::CreateAuthKeyRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "CreateAuthKey") + RpcServiceRequest("cloudauth", "2018-09-16", "CreateAuthKey") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/CreateVerifySDKRequest.cc b/cloudauth/src/model/CreateVerifySDKRequest.cc index ae4d386b2..5d0531f5e 100644 --- a/cloudauth/src/model/CreateVerifySDKRequest.cc +++ b/cloudauth/src/model/CreateVerifySDKRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::CreateVerifySDKRequest; CreateVerifySDKRequest::CreateVerifySDKRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "CreateVerifySDK") + RpcServiceRequest("cloudauth", "2018-09-16", "CreateVerifySDK") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/DescribeDeviceInfoRequest.cc b/cloudauth/src/model/DescribeDeviceInfoRequest.cc index ad03f9b66..3186499e0 100644 --- a/cloudauth/src/model/DescribeDeviceInfoRequest.cc +++ b/cloudauth/src/model/DescribeDeviceInfoRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::DescribeDeviceInfoRequest; DescribeDeviceInfoRequest::DescribeDeviceInfoRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "DescribeDeviceInfo") + RpcServiceRequest("cloudauth", "2018-09-16", "DescribeDeviceInfo") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/DescribeVerifySDKRequest.cc b/cloudauth/src/model/DescribeVerifySDKRequest.cc index 68c8f0bea..f938f30f9 100644 --- a/cloudauth/src/model/DescribeVerifySDKRequest.cc +++ b/cloudauth/src/model/DescribeVerifySDKRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::DescribeVerifySDKRequest; DescribeVerifySDKRequest::DescribeVerifySDKRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "DescribeVerifySDK") + RpcServiceRequest("cloudauth", "2018-09-16", "DescribeVerifySDK") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/DetectFaceAttributesRequest.cc b/cloudauth/src/model/DetectFaceAttributesRequest.cc index e876ba45f..398d35715 100644 --- a/cloudauth/src/model/DetectFaceAttributesRequest.cc +++ b/cloudauth/src/model/DetectFaceAttributesRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::DetectFaceAttributesRequest; DetectFaceAttributesRequest::DetectFaceAttributesRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "DetectFaceAttributes") + RpcServiceRequest("cloudauth", "2018-09-16", "DetectFaceAttributes") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/GetMaterialsRequest.cc b/cloudauth/src/model/GetMaterialsRequest.cc new file mode 100644 index 000000000..eeee65818 --- /dev/null +++ b/cloudauth/src/model/GetMaterialsRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Cloudauth::Model::GetMaterialsRequest; + +GetMaterialsRequest::GetMaterialsRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "GetMaterials") +{ + setMethod(HttpRequest::Method::Post); +} + +GetMaterialsRequest::~GetMaterialsRequest() +{} + +long GetMaterialsRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetMaterialsRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string GetMaterialsRequest::getBiz()const +{ + return biz_; +} + +void GetMaterialsRequest::setBiz(const std::string& biz) +{ + biz_ = biz; + setParameter("Biz", biz); +} + +std::string GetMaterialsRequest::getSourceIp()const +{ + return sourceIp_; +} + +void GetMaterialsRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string GetMaterialsRequest::getTicketId()const +{ + return ticketId_; +} + +void GetMaterialsRequest::setTicketId(const std::string& ticketId) +{ + ticketId_ = ticketId; + setParameter("TicketId", ticketId); +} + diff --git a/cloudauth/src/model/GetMaterialsResult.cc b/cloudauth/src/model/GetMaterialsResult.cc new file mode 100644 index 000000000..ac4ef119d --- /dev/null +++ b/cloudauth/src/model/GetMaterialsResult.cc @@ -0,0 +1,95 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +GetMaterialsResult::GetMaterialsResult() : + ServiceResult() +{} + +GetMaterialsResult::GetMaterialsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetMaterialsResult::~GetMaterialsResult() +{} + +void GetMaterialsResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["Name"].isNull()) + data_.name = dataNode["Name"].asString(); + if(!dataNode["IdentificationNumber"].isNull()) + data_.identificationNumber = dataNode["IdentificationNumber"].asString(); + if(!dataNode["IdCardType"].isNull()) + data_.idCardType = dataNode["IdCardType"].asString(); + if(!dataNode["IdCardStartDate"].isNull()) + data_.idCardStartDate = dataNode["IdCardStartDate"].asString(); + if(!dataNode["IdCardExpiry"].isNull()) + data_.idCardExpiry = dataNode["IdCardExpiry"].asString(); + if(!dataNode["Address"].isNull()) + data_.address = dataNode["Address"].asString(); + if(!dataNode["Sex"].isNull()) + data_.sex = dataNode["Sex"].asString(); + if(!dataNode["IdCardFrontPic"].isNull()) + data_.idCardFrontPic = dataNode["IdCardFrontPic"].asString(); + if(!dataNode["IdCardBackPic"].isNull()) + data_.idCardBackPic = dataNode["IdCardBackPic"].asString(); + if(!dataNode["FacePic"].isNull()) + data_.facePic = dataNode["FacePic"].asString(); + if(!dataNode["EthnicGroup"].isNull()) + data_.ethnicGroup = dataNode["EthnicGroup"].asString(); + if(!dataNode["Authority"].isNull()) + data_.authority = dataNode["Authority"].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 GetMaterialsResult::getMessage()const +{ + return message_; +} + +GetMaterialsResult::Data GetMaterialsResult::getData()const +{ + return data_; +} + +std::string GetMaterialsResult::getCode()const +{ + return code_; +} + +bool GetMaterialsResult::getSuccess()const +{ + return success_; +} + diff --git a/cloudauth/src/model/GetStatusRequest.cc b/cloudauth/src/model/GetStatusRequest.cc new file mode 100644 index 000000000..ce0555e3c --- /dev/null +++ b/cloudauth/src/model/GetStatusRequest.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Cloudauth::Model::GetStatusRequest; + +GetStatusRequest::GetStatusRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "GetStatus") +{ + setMethod(HttpRequest::Method::Post); +} + +GetStatusRequest::~GetStatusRequest() +{} + +long GetStatusRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetStatusRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string GetStatusRequest::getBiz()const +{ + return biz_; +} + +void GetStatusRequest::setBiz(const std::string& biz) +{ + biz_ = biz; + setParameter("Biz", biz); +} + +std::string GetStatusRequest::getSourceIp()const +{ + return sourceIp_; +} + +void GetStatusRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string GetStatusRequest::getTicketId()const +{ + return ticketId_; +} + +void GetStatusRequest::setTicketId(const std::string& ticketId) +{ + ticketId_ = ticketId; + setParameter("TicketId", ticketId); +} + diff --git a/cloudauth/src/model/GetStatusResult.cc b/cloudauth/src/model/GetStatusResult.cc new file mode 100644 index 000000000..50fefa14d --- /dev/null +++ b/cloudauth/src/model/GetStatusResult.cc @@ -0,0 +1,81 @@ +/* + * 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; + +GetStatusResult::GetStatusResult() : + ServiceResult() +{} + +GetStatusResult::GetStatusResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetStatusResult::~GetStatusResult() +{} + +void GetStatusResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["StatusCode"].isNull()) + data_.statusCode = std::stoi(dataNode["StatusCode"].asString()); + if(!dataNode["TrustedScore"].isNull()) + data_.trustedScore = std::stof(dataNode["TrustedScore"].asString()); + if(!dataNode["SimilarityScore"].isNull()) + 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()) + code_ = value["Code"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + +} + +std::string GetStatusResult::getMessage()const +{ + return message_; +} + +GetStatusResult::Data GetStatusResult::getData()const +{ + return data_; +} + +std::string GetStatusResult::getCode()const +{ + return code_; +} + +bool GetStatusResult::getSuccess()const +{ + return success_; +} + diff --git a/cloudauth/src/model/GetVerifyTokenRequest.cc b/cloudauth/src/model/GetVerifyTokenRequest.cc new file mode 100644 index 000000000..c05a331b0 --- /dev/null +++ b/cloudauth/src/model/GetVerifyTokenRequest.cc @@ -0,0 +1,106 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Cloudauth::Model::GetVerifyTokenRequest; + +GetVerifyTokenRequest::GetVerifyTokenRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "GetVerifyToken") +{ + setMethod(HttpRequest::Method::Post); +} + +GetVerifyTokenRequest::~GetVerifyTokenRequest() +{} + +long GetVerifyTokenRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void GetVerifyTokenRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string GetVerifyTokenRequest::getBinding()const +{ + return binding_; +} + +void GetVerifyTokenRequest::setBinding(const std::string& binding) +{ + binding_ = binding; + setBodyParameter("Binding", binding); +} + +std::string GetVerifyTokenRequest::getVerifyConfigs()const +{ + return verifyConfigs_; +} + +void GetVerifyTokenRequest::setVerifyConfigs(const std::string& verifyConfigs) +{ + verifyConfigs_ = verifyConfigs; + setParameter("VerifyConfigs", verifyConfigs); +} + +std::string GetVerifyTokenRequest::getUserData()const +{ + return userData_; +} + +void GetVerifyTokenRequest::setUserData(const std::string& userData) +{ + userData_ = userData; + setParameter("UserData", userData); +} + +std::string GetVerifyTokenRequest::getBiz()const +{ + return biz_; +} + +void GetVerifyTokenRequest::setBiz(const std::string& biz) +{ + biz_ = biz; + setParameter("Biz", biz); +} + +std::string GetVerifyTokenRequest::getSourceIp()const +{ + return sourceIp_; +} + +void GetVerifyTokenRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::string GetVerifyTokenRequest::getTicketId()const +{ + return ticketId_; +} + +void GetVerifyTokenRequest::setTicketId(const std::string& ticketId) +{ + ticketId_ = ticketId; + setParameter("TicketId", ticketId); +} + diff --git a/cloudauth/src/model/GetVerifyTokenResult.cc b/cloudauth/src/model/GetVerifyTokenResult.cc new file mode 100644 index 000000000..0075bda56 --- /dev/null +++ b/cloudauth/src/model/GetVerifyTokenResult.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 +#include + +using namespace AlibabaCloud::Cloudauth; +using namespace AlibabaCloud::Cloudauth::Model; + +GetVerifyTokenResult::GetVerifyTokenResult() : + ServiceResult() +{} + +GetVerifyTokenResult::GetVerifyTokenResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetVerifyTokenResult::~GetVerifyTokenResult() +{} + +void GetVerifyTokenResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto dataNode = value["Data"]; + if(!dataNode["CloudauthPageUrl"].isNull()) + data_.cloudauthPageUrl = dataNode["CloudauthPageUrl"].asString(); + auto verifyTokenNode = dataNode["VerifyToken"]; + if(!verifyTokenNode["Token"].isNull()) + data_.verifyToken.token = verifyTokenNode["Token"].asString(); + if(!verifyTokenNode["DurationSeconds"].isNull()) + data_.verifyToken.durationSeconds = std::stoi(verifyTokenNode["DurationSeconds"].asString()); + auto stsTokenNode = dataNode["StsToken"]; + if(!stsTokenNode["AccessKeyId"].isNull()) + data_.stsToken.accessKeyId = stsTokenNode["AccessKeyId"].asString(); + if(!stsTokenNode["AccessKeySecret"].isNull()) + data_.stsToken.accessKeySecret = stsTokenNode["AccessKeySecret"].asString(); + if(!stsTokenNode["Expiration"].isNull()) + data_.stsToken.expiration = stsTokenNode["Expiration"].asString(); + if(!stsTokenNode["EndPoint"].isNull()) + data_.stsToken.endPoint = stsTokenNode["EndPoint"].asString(); + if(!stsTokenNode["BucketName"].isNull()) + data_.stsToken.bucketName = stsTokenNode["BucketName"].asString(); + if(!stsTokenNode["Path"].isNull()) + data_.stsToken.path = stsTokenNode["Path"].asString(); + if(!stsTokenNode["Token"].isNull()) + data_.stsToken.token = stsTokenNode["Token"].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 GetVerifyTokenResult::getMessage()const +{ + return message_; +} + +GetVerifyTokenResult::Data GetVerifyTokenResult::getData()const +{ + return data_; +} + +std::string GetVerifyTokenResult::getCode()const +{ + return code_; +} + +bool GetVerifyTokenResult::getSuccess()const +{ + return success_; +} + diff --git a/cloudauth/src/model/ModifyDeviceInfoRequest.cc b/cloudauth/src/model/ModifyDeviceInfoRequest.cc index e565c345d..14600b941 100644 --- a/cloudauth/src/model/ModifyDeviceInfoRequest.cc +++ b/cloudauth/src/model/ModifyDeviceInfoRequest.cc @@ -19,7 +19,7 @@ using AlibabaCloud::Cloudauth::Model::ModifyDeviceInfoRequest; ModifyDeviceInfoRequest::ModifyDeviceInfoRequest() : - RpcServiceRequest("cloudauth", "2019-03-07", "ModifyDeviceInfo") + RpcServiceRequest("cloudauth", "2018-09-16", "ModifyDeviceInfo") { setMethod(HttpRequest::Method::Post); } diff --git a/cloudauth/src/model/SubmitMaterialsRequest.cc b/cloudauth/src/model/SubmitMaterialsRequest.cc new file mode 100644 index 000000000..5c73d1222 --- /dev/null +++ b/cloudauth/src/model/SubmitMaterialsRequest.cc @@ -0,0 +1,78 @@ +/* + * 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::SubmitMaterialsRequest; + +SubmitMaterialsRequest::SubmitMaterialsRequest() : + RpcServiceRequest("cloudauth", "2018-09-16", "SubmitMaterials") +{ + setMethod(HttpRequest::Method::Post); +} + +SubmitMaterialsRequest::~SubmitMaterialsRequest() +{} + +long SubmitMaterialsRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void SubmitMaterialsRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string SubmitMaterialsRequest::getVerifyToken()const +{ + return verifyToken_; +} + +void SubmitMaterialsRequest::setVerifyToken(const std::string& verifyToken) +{ + verifyToken_ = verifyToken; + setBodyParameter("VerifyToken", verifyToken); +} + +std::string SubmitMaterialsRequest::getSourceIp()const +{ + return sourceIp_; +} + +void SubmitMaterialsRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::vector SubmitMaterialsRequest::getMaterial()const +{ + return material_; +} + +void SubmitMaterialsRequest::setMaterial(const std::vector& material) +{ + material_ = material; + for(int dep1 = 0; dep1!= material.size(); dep1++) { + auto materialObj = material.at(dep1); + std::string materialObjStr = "Material." + std::to_string(dep1 + 1); + setParameter(materialObjStr + ".MaterialType", materialObj.materialType); + setParameter(materialObjStr + ".Value", materialObj.value); + } +} + diff --git a/cloudauth/src/model/SubmitMaterialsResult.cc b/cloudauth/src/model/SubmitMaterialsResult.cc new file mode 100644 index 000000000..c73ca1928 --- /dev/null +++ b/cloudauth/src/model/SubmitMaterialsResult.cc @@ -0,0 +1,82 @@ +/* + * 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; + +SubmitMaterialsResult::SubmitMaterialsResult() : + ServiceResult() +{} + +SubmitMaterialsResult::SubmitMaterialsResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +SubmitMaterialsResult::~SubmitMaterialsResult() +{} + +void SubmitMaterialsResult::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 SubmitMaterialsResult::getMessage()const +{ + return message_; +} + +SubmitMaterialsResult::Data SubmitMaterialsResult::getData()const +{ + return data_; +} + +std::string SubmitMaterialsResult::getCode()const +{ + return code_; +} + +bool SubmitMaterialsResult::getSuccess()const +{ + return success_; +} + diff --git a/cloudauth/src/model/SubmitVerificationRequest.cc b/cloudauth/src/model/SubmitVerificationRequest.cc new file mode 100644 index 000000000..3d0cc2c48 --- /dev/null +++ b/cloudauth/src/model/SubmitVerificationRequest.cc @@ -0,0 +1,89 @@ +/* + * 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") +{ + setMethod(HttpRequest::Method::Post); +} + +SubmitVerificationRequest::~SubmitVerificationRequest() +{} + +long SubmitVerificationRequest::getResourceOwnerId()const +{ + return resourceOwnerId_; +} + +void SubmitVerificationRequest::setResourceOwnerId(long resourceOwnerId) +{ + resourceOwnerId_ = resourceOwnerId; + setParameter("ResourceOwnerId", std::to_string(resourceOwnerId)); +} + +std::string SubmitVerificationRequest::getBiz()const +{ + return biz_; +} + +void SubmitVerificationRequest::setBiz(const std::string& biz) +{ + biz_ = biz; + setBodyParameter("Biz", biz); +} + +std::string SubmitVerificationRequest::getSourceIp()const +{ + return sourceIp_; +} + +void SubmitVerificationRequest::setSourceIp(const std::string& sourceIp) +{ + sourceIp_ = sourceIp; + setParameter("SourceIp", sourceIp); +} + +std::vector SubmitVerificationRequest::getMaterial()const +{ + return material_; +} + +void SubmitVerificationRequest::setMaterial(const std::vector& material) +{ + material_ = material; + for(int dep1 = 0; dep1!= material.size(); dep1++) { + auto materialObj = material.at(dep1); + std::string materialObjStr = "Material." + std::to_string(dep1 + 1); + setParameter(materialObjStr + ".MaterialType", materialObj.materialType); + setParameter(materialObjStr + ".Value", materialObj.value); + } +} + +std::string SubmitVerificationRequest::getTicketId()const +{ + return ticketId_; +} + +void SubmitVerificationRequest::setTicketId(const std::string& ticketId) +{ + ticketId_ = ticketId; + setBodyParameter("TicketId", ticketId); +} + diff --git a/cloudauth/src/model/SubmitVerificationResult.cc b/cloudauth/src/model/SubmitVerificationResult.cc new file mode 100644 index 000000000..5c642c060 --- /dev/null +++ b/cloudauth/src/model/SubmitVerificationResult.cc @@ -0,0 +1,82 @@ +/* + * 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_; +} +