From 8de0b02bdaf74f3ee026554d318abd81333d8210 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Fri, 25 Nov 2022 03:11:26 +0000 Subject: [PATCH] Release CustomizeClassifyImage. --- VERSION | 2 +- viapi-regen/CMakeLists.txt | 8 +++ .../viapi-regen/Viapi_regenClient.h | 16 +++++ .../model/CheckDatasetOssBucketCORSRequest.h | 42 +++++++++++ .../model/CheckDatasetOssBucketCORSResult.h | 61 ++++++++++++++++ .../viapi-regen/model/GetUserInfoRequest.h | 39 ++++++++++ .../viapi-regen/model/GetUserInfoResult.h | 60 ++++++++++++++++ viapi-regen/src/Viapi-regenClient.cc | 72 +++++++++++++++++++ .../model/CheckDatasetOssBucketCORSRequest.cc | 36 ++++++++++ .../model/CheckDatasetOssBucketCORSResult.cc | 70 ++++++++++++++++++ viapi-regen/src/model/GetUserInfoRequest.cc | 27 +++++++ viapi-regen/src/model/GetUserInfoResult.cc | 68 ++++++++++++++++++ 12 files changed, 500 insertions(+), 1 deletion(-) create mode 100644 viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSRequest.h create mode 100644 viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSResult.h create mode 100644 viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoRequest.h create mode 100644 viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoResult.h create mode 100644 viapi-regen/src/model/CheckDatasetOssBucketCORSRequest.cc create mode 100644 viapi-regen/src/model/CheckDatasetOssBucketCORSResult.cc create mode 100644 viapi-regen/src/model/GetUserInfoRequest.cc create mode 100644 viapi-regen/src/model/GetUserInfoResult.cc diff --git a/VERSION b/VERSION index bc0b25918..ae508f826 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1349 \ No newline at end of file +1.36.1350 \ No newline at end of file diff --git a/viapi-regen/CMakeLists.txt b/viapi-regen/CMakeLists.txt index 8ade1558a..9b1874dca 100644 --- a/viapi-regen/CMakeLists.txt +++ b/viapi-regen/CMakeLists.txt @@ -21,6 +21,8 @@ set(viapi-regen_public_header include/alibabacloud/viapi-regen/Viapi_regenExport.h ) set(viapi-regen_public_header_model + include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSRequest.h + include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSResult.h include/alibabacloud/viapi-regen/model/CreateDatasetRequest.h include/alibabacloud/viapi-regen/model/CreateDatasetResult.h include/alibabacloud/viapi-regen/model/CreateLabelsetRequest.h @@ -89,6 +91,8 @@ set(viapi-regen_public_header_model include/alibabacloud/viapi-regen/model/GetTrainTaskEstimatedTimeResult.h include/alibabacloud/viapi-regen/model/GetUploadPolicyRequest.h include/alibabacloud/viapi-regen/model/GetUploadPolicyResult.h + include/alibabacloud/viapi-regen/model/GetUserInfoRequest.h + include/alibabacloud/viapi-regen/model/GetUserInfoResult.h include/alibabacloud/viapi-regen/model/GetWorkspaceRequest.h include/alibabacloud/viapi-regen/model/GetWorkspaceResult.h include/alibabacloud/viapi-regen/model/ListDataReflowDatasRequest.h @@ -130,6 +134,8 @@ set(viapi-regen_public_header_model set(viapi-regen_src src/Viapi-regenClient.cc + src/model/CheckDatasetOssBucketCORSRequest.cc + src/model/CheckDatasetOssBucketCORSResult.cc src/model/CreateDatasetRequest.cc src/model/CreateDatasetResult.cc src/model/CreateLabelsetRequest.cc @@ -198,6 +204,8 @@ set(viapi-regen_src src/model/GetTrainTaskEstimatedTimeResult.cc src/model/GetUploadPolicyRequest.cc src/model/GetUploadPolicyResult.cc + src/model/GetUserInfoRequest.cc + src/model/GetUserInfoResult.cc src/model/GetWorkspaceRequest.cc src/model/GetWorkspaceResult.cc src/model/ListDataReflowDatasRequest.cc diff --git a/viapi-regen/include/alibabacloud/viapi-regen/Viapi_regenClient.h b/viapi-regen/include/alibabacloud/viapi-regen/Viapi_regenClient.h index f7e314253..f420c9124 100644 --- a/viapi-regen/include/alibabacloud/viapi-regen/Viapi_regenClient.h +++ b/viapi-regen/include/alibabacloud/viapi-regen/Viapi_regenClient.h @@ -22,6 +22,8 @@ #include #include #include "Viapi_regenExport.h" +#include "model/CheckDatasetOssBucketCORSRequest.h" +#include "model/CheckDatasetOssBucketCORSResult.h" #include "model/CreateDatasetRequest.h" #include "model/CreateDatasetResult.h" #include "model/CreateLabelsetRequest.h" @@ -90,6 +92,8 @@ #include "model/GetTrainTaskEstimatedTimeResult.h" #include "model/GetUploadPolicyRequest.h" #include "model/GetUploadPolicyResult.h" +#include "model/GetUserInfoRequest.h" +#include "model/GetUserInfoResult.h" #include "model/GetWorkspaceRequest.h" #include "model/GetWorkspaceResult.h" #include "model/ListDataReflowDatasRequest.h" @@ -137,6 +141,9 @@ namespace AlibabaCloud class ALIBABACLOUD_VIAPI_REGEN_EXPORT Viapi_regenClient : public RpcServiceClient { public: + typedef Outcome CheckDatasetOssBucketCORSOutcome; + typedef std::future CheckDatasetOssBucketCORSOutcomeCallable; + typedef std::function&)> CheckDatasetOssBucketCORSAsyncHandler; typedef Outcome CreateDatasetOutcome; typedef std::future CreateDatasetOutcomeCallable; typedef std::function&)> CreateDatasetAsyncHandler; @@ -239,6 +246,9 @@ namespace AlibabaCloud typedef Outcome GetUploadPolicyOutcome; typedef std::future GetUploadPolicyOutcomeCallable; typedef std::function&)> GetUploadPolicyAsyncHandler; + typedef Outcome GetUserInfoOutcome; + typedef std::future GetUserInfoOutcomeCallable; + typedef std::function&)> GetUserInfoAsyncHandler; typedef Outcome GetWorkspaceOutcome; typedef std::future GetWorkspaceOutcomeCallable; typedef std::function&)> GetWorkspaceAsyncHandler; @@ -301,6 +311,9 @@ namespace AlibabaCloud Viapi_regenClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); Viapi_regenClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration); ~Viapi_regenClient(); + CheckDatasetOssBucketCORSOutcome checkDatasetOssBucketCORS(const Model::CheckDatasetOssBucketCORSRequest &request)const; + void checkDatasetOssBucketCORSAsync(const Model::CheckDatasetOssBucketCORSRequest& request, const CheckDatasetOssBucketCORSAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CheckDatasetOssBucketCORSOutcomeCallable checkDatasetOssBucketCORSCallable(const Model::CheckDatasetOssBucketCORSRequest& request) const; CreateDatasetOutcome createDataset(const Model::CreateDatasetRequest &request)const; void createDatasetAsync(const Model::CreateDatasetRequest& request, const CreateDatasetAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateDatasetOutcomeCallable createDatasetCallable(const Model::CreateDatasetRequest& request) const; @@ -403,6 +416,9 @@ namespace AlibabaCloud GetUploadPolicyOutcome getUploadPolicy(const Model::GetUploadPolicyRequest &request)const; void getUploadPolicyAsync(const Model::GetUploadPolicyRequest& request, const GetUploadPolicyAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetUploadPolicyOutcomeCallable getUploadPolicyCallable(const Model::GetUploadPolicyRequest& request) const; + GetUserInfoOutcome getUserInfo(const Model::GetUserInfoRequest &request)const; + void getUserInfoAsync(const Model::GetUserInfoRequest& request, const GetUserInfoAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetUserInfoOutcomeCallable getUserInfoCallable(const Model::GetUserInfoRequest& request) const; GetWorkspaceOutcome getWorkspace(const Model::GetWorkspaceRequest &request)const; void getWorkspaceAsync(const Model::GetWorkspaceRequest& request, const GetWorkspaceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; GetWorkspaceOutcomeCallable getWorkspaceCallable(const Model::GetWorkspaceRequest& request) const; diff --git a/viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSRequest.h b/viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSRequest.h new file mode 100644 index 000000000..762e9786c --- /dev/null +++ b/viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSRequest.h @@ -0,0 +1,42 @@ +/* + * 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_VIAPI_REGEN_MODEL_CHECKDATASETOSSBUCKETCORSREQUEST_H_ +#define ALIBABACLOUD_VIAPI_REGEN_MODEL_CHECKDATASETOSSBUCKETCORSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Viapi_regen { +namespace Model { +class ALIBABACLOUD_VIAPI_REGEN_EXPORT CheckDatasetOssBucketCORSRequest : public RpcServiceRequest { +public: + CheckDatasetOssBucketCORSRequest(); + ~CheckDatasetOssBucketCORSRequest(); + long getLabelsetId() const; + void setLabelsetId(long labelsetId); + +private: + long labelsetId_; +}; +} // namespace Model +} // namespace Viapi_regen +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_VIAPI_REGEN_MODEL_CHECKDATASETOSSBUCKETCORSREQUEST_H_ diff --git a/viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSResult.h b/viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSResult.h new file mode 100644 index 000000000..4c36e3096 --- /dev/null +++ b/viapi-regen/include/alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSResult.h @@ -0,0 +1,61 @@ +/* + * 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_VIAPI_REGEN_MODEL_CHECKDATASETOSSBUCKETCORSRESULT_H_ +#define ALIBABACLOUD_VIAPI_REGEN_MODEL_CHECKDATASETOSSBUCKETCORSRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Viapi_regen + { + namespace Model + { + class ALIBABACLOUD_VIAPI_REGEN_EXPORT CheckDatasetOssBucketCORSResult : public ServiceResult + { + public: + struct Data + { + std::string bucket; + std::string ossBucketCORSConfigUrl; + bool setOssBucketCORSFlag; + }; + + + CheckDatasetOssBucketCORSResult(); + explicit CheckDatasetOssBucketCORSResult(const std::string &payload); + ~CheckDatasetOssBucketCORSResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VIAPI_REGEN_MODEL_CHECKDATASETOSSBUCKETCORSRESULT_H_ \ No newline at end of file diff --git a/viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoRequest.h b/viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoRequest.h new file mode 100644 index 000000000..dd4af3355 --- /dev/null +++ b/viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoRequest.h @@ -0,0 +1,39 @@ +/* + * 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_VIAPI_REGEN_MODEL_GETUSERINFOREQUEST_H_ +#define ALIBABACLOUD_VIAPI_REGEN_MODEL_GETUSERINFOREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Viapi_regen { +namespace Model { +class ALIBABACLOUD_VIAPI_REGEN_EXPORT GetUserInfoRequest : public RpcServiceRequest { +public: + GetUserInfoRequest(); + ~GetUserInfoRequest(); + +private: +}; +} // namespace Model +} // namespace Viapi_regen +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_VIAPI_REGEN_MODEL_GETUSERINFOREQUEST_H_ diff --git a/viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoResult.h b/viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoResult.h new file mode 100644 index 000000000..62576a97d --- /dev/null +++ b/viapi-regen/include/alibabacloud/viapi-regen/model/GetUserInfoResult.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_VIAPI_REGEN_MODEL_GETUSERINFORESULT_H_ +#define ALIBABACLOUD_VIAPI_REGEN_MODEL_GETUSERINFORESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Viapi_regen + { + namespace Model + { + class ALIBABACLOUD_VIAPI_REGEN_EXPORT GetUserInfoResult : public ServiceResult + { + public: + struct Data + { + std::string userType; + std::string parentUid; + }; + + + GetUserInfoResult(); + explicit GetUserInfoResult(const std::string &payload); + ~GetUserInfoResult(); + std::string getMessage()const; + Data getData()const; + std::string getCode()const; + + protected: + void parse(const std::string &payload); + private: + std::string message_; + Data data_; + std::string code_; + + }; + } + } +} +#endif // !ALIBABACLOUD_VIAPI_REGEN_MODEL_GETUSERINFORESULT_H_ \ No newline at end of file diff --git a/viapi-regen/src/Viapi-regenClient.cc b/viapi-regen/src/Viapi-regenClient.cc index 5f8ae242a..27a4f2584 100644 --- a/viapi-regen/src/Viapi-regenClient.cc +++ b/viapi-regen/src/Viapi-regenClient.cc @@ -51,6 +51,42 @@ Viapi_regenClient::Viapi_regenClient(const std::string & accessKeyId, const std: Viapi_regenClient::~Viapi_regenClient() {} +Viapi_regenClient::CheckDatasetOssBucketCORSOutcome Viapi_regenClient::checkDatasetOssBucketCORS(const CheckDatasetOssBucketCORSRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CheckDatasetOssBucketCORSOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CheckDatasetOssBucketCORSOutcome(CheckDatasetOssBucketCORSResult(outcome.result())); + else + return CheckDatasetOssBucketCORSOutcome(outcome.error()); +} + +void Viapi_regenClient::checkDatasetOssBucketCORSAsync(const CheckDatasetOssBucketCORSRequest& request, const CheckDatasetOssBucketCORSAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, checkDatasetOssBucketCORS(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Viapi_regenClient::CheckDatasetOssBucketCORSOutcomeCallable Viapi_regenClient::checkDatasetOssBucketCORSCallable(const CheckDatasetOssBucketCORSRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->checkDatasetOssBucketCORS(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Viapi_regenClient::CreateDatasetOutcome Viapi_regenClient::createDataset(const CreateDatasetRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -1275,6 +1311,42 @@ Viapi_regenClient::GetUploadPolicyOutcomeCallable Viapi_regenClient::getUploadPo return task->get_future(); } +Viapi_regenClient::GetUserInfoOutcome Viapi_regenClient::getUserInfo(const GetUserInfoRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetUserInfoOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetUserInfoOutcome(GetUserInfoResult(outcome.result())); + else + return GetUserInfoOutcome(outcome.error()); +} + +void Viapi_regenClient::getUserInfoAsync(const GetUserInfoRequest& request, const GetUserInfoAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getUserInfo(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Viapi_regenClient::GetUserInfoOutcomeCallable Viapi_regenClient::getUserInfoCallable(const GetUserInfoRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getUserInfo(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Viapi_regenClient::GetWorkspaceOutcome Viapi_regenClient::getWorkspace(const GetWorkspaceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/viapi-regen/src/model/CheckDatasetOssBucketCORSRequest.cc b/viapi-regen/src/model/CheckDatasetOssBucketCORSRequest.cc new file mode 100644 index 000000000..91620514b --- /dev/null +++ b/viapi-regen/src/model/CheckDatasetOssBucketCORSRequest.cc @@ -0,0 +1,36 @@ +/* + * 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::Viapi_regen::Model::CheckDatasetOssBucketCORSRequest; + +CheckDatasetOssBucketCORSRequest::CheckDatasetOssBucketCORSRequest() + : RpcServiceRequest("viapi-regen", "2021-11-19", "CheckDatasetOssBucketCORS") { + setMethod(HttpRequest::Method::Post); +} + +CheckDatasetOssBucketCORSRequest::~CheckDatasetOssBucketCORSRequest() {} + +long CheckDatasetOssBucketCORSRequest::getLabelsetId() const { + return labelsetId_; +} + +void CheckDatasetOssBucketCORSRequest::setLabelsetId(long labelsetId) { + labelsetId_ = labelsetId; + setBodyParameter(std::string("LabelsetId"), std::to_string(labelsetId)); +} + diff --git a/viapi-regen/src/model/CheckDatasetOssBucketCORSResult.cc b/viapi-regen/src/model/CheckDatasetOssBucketCORSResult.cc new file mode 100644 index 000000000..2a93611d6 --- /dev/null +++ b/viapi-regen/src/model/CheckDatasetOssBucketCORSResult.cc @@ -0,0 +1,70 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Viapi_regen; +using namespace AlibabaCloud::Viapi_regen::Model; + +CheckDatasetOssBucketCORSResult::CheckDatasetOssBucketCORSResult() : + ServiceResult() +{} + +CheckDatasetOssBucketCORSResult::CheckDatasetOssBucketCORSResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CheckDatasetOssBucketCORSResult::~CheckDatasetOssBucketCORSResult() +{} + +void CheckDatasetOssBucketCORSResult::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["SetOssBucketCORSFlag"].isNull()) + data_.setOssBucketCORSFlag = dataNode["SetOssBucketCORSFlag"].asString() == "true"; + if(!dataNode["OssBucketCORSConfigUrl"].isNull()) + data_.ossBucketCORSConfigUrl = dataNode["OssBucketCORSConfigUrl"].asString(); + if(!dataNode["Bucket"].isNull()) + data_.bucket = dataNode["Bucket"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + +} + +std::string CheckDatasetOssBucketCORSResult::getMessage()const +{ + return message_; +} + +CheckDatasetOssBucketCORSResult::Data CheckDatasetOssBucketCORSResult::getData()const +{ + return data_; +} + +std::string CheckDatasetOssBucketCORSResult::getCode()const +{ + return code_; +} + diff --git a/viapi-regen/src/model/GetUserInfoRequest.cc b/viapi-regen/src/model/GetUserInfoRequest.cc new file mode 100644 index 000000000..0d79feb69 --- /dev/null +++ b/viapi-regen/src/model/GetUserInfoRequest.cc @@ -0,0 +1,27 @@ +/* + * 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::Viapi_regen::Model::GetUserInfoRequest; + +GetUserInfoRequest::GetUserInfoRequest() + : RpcServiceRequest("viapi-regen", "2021-11-19", "GetUserInfo") { + setMethod(HttpRequest::Method::Post); +} + +GetUserInfoRequest::~GetUserInfoRequest() {} + diff --git a/viapi-regen/src/model/GetUserInfoResult.cc b/viapi-regen/src/model/GetUserInfoResult.cc new file mode 100644 index 000000000..d8656433b --- /dev/null +++ b/viapi-regen/src/model/GetUserInfoResult.cc @@ -0,0 +1,68 @@ +/* + * 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::Viapi_regen; +using namespace AlibabaCloud::Viapi_regen::Model; + +GetUserInfoResult::GetUserInfoResult() : + ServiceResult() +{} + +GetUserInfoResult::GetUserInfoResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetUserInfoResult::~GetUserInfoResult() +{} + +void GetUserInfoResult::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["ParentUid"].isNull()) + data_.parentUid = dataNode["ParentUid"].asString(); + if(!dataNode["UserType"].isNull()) + data_.userType = dataNode["UserType"].asString(); + if(!value["Message"].isNull()) + message_ = value["Message"].asString(); + if(!value["Code"].isNull()) + code_ = value["Code"].asString(); + +} + +std::string GetUserInfoResult::getMessage()const +{ + return message_; +} + +GetUserInfoResult::Data GetUserInfoResult::getData()const +{ + return data_; +} + +std::string GetUserInfoResult::getCode()const +{ + return code_; +} +