Release CustomizeClassifyImage.

This commit is contained in:
sdk-team
2022-11-25 03:11:26 +00:00
parent 990e340be2
commit 8de0b02bda
12 changed files with 500 additions and 1 deletions

View File

@@ -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<const AsyncCallerContext>& 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<std::packaged_task<CheckDatasetOssBucketCORSOutcome()>>(
[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<const AsyncCallerContext>& 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<std::packaged_task<GetUserInfoOutcome()>>(
[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();

View File

@@ -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 <alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSRequest.h>
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));
}

View File

@@ -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 <alibabacloud/viapi-regen/model/CheckDatasetOssBucketCORSResult.h>
#include <json/json.h>
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_;
}

View File

@@ -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 <alibabacloud/viapi-regen/model/GetUserInfoRequest.h>
using AlibabaCloud::Viapi_regen::Model::GetUserInfoRequest;
GetUserInfoRequest::GetUserInfoRequest()
: RpcServiceRequest("viapi-regen", "2021-11-19", "GetUserInfo") {
setMethod(HttpRequest::Method::Post);
}
GetUserInfoRequest::~GetUserInfoRequest() {}

View File

@@ -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 <alibabacloud/viapi-regen/model/GetUserInfoResult.h>
#include <json/json.h>
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_;
}