Supported UpdateUserBucketConfig.
This commit is contained in:
@@ -31,21 +31,21 @@ IvpdClient::IvpdClient(const Credentials &credentials, const ClientConfiguration
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ivpd");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ivpd");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
IvpdClient::IvpdClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "ivpd");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
IvpdClient::~IvpdClient()
|
||||
@@ -375,6 +375,42 @@ IvpdClient::GetRenderResultOutcomeCallable IvpdClient::getRenderResultCallable(c
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::GetUserBucketConfigOutcome IvpdClient::getUserBucketConfig(const GetUserBucketConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetUserBucketConfigOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetUserBucketConfigOutcome(GetUserBucketConfigResult(outcome.result()));
|
||||
else
|
||||
return GetUserBucketConfigOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::getUserBucketConfigAsync(const GetUserBucketConfigRequest& request, const GetUserBucketConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getUserBucketConfig(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::GetUserBucketConfigOutcomeCallable IvpdClient::getUserBucketConfigCallable(const GetUserBucketConfigRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetUserBucketConfigOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getUserBucketConfig(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::ListPackageDesignModelTypesOutcome IvpdClient::listPackageDesignModelTypes(const ListPackageDesignModelTypesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -411,6 +447,42 @@ IvpdClient::ListPackageDesignModelTypesOutcomeCallable IvpdClient::listPackageDe
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::ListUserBucketsOutcome IvpdClient::listUserBuckets(const ListUserBucketsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListUserBucketsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListUserBucketsOutcome(ListUserBucketsResult(outcome.result()));
|
||||
else
|
||||
return ListUserBucketsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::listUserBucketsAsync(const ListUserBucketsRequest& request, const ListUserBucketsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listUserBuckets(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::ListUserBucketsOutcomeCallable IvpdClient::listUserBucketsCallable(const ListUserBucketsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListUserBucketsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listUserBuckets(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::MakeSuperResolutionImageOutcome IvpdClient::makeSuperResolutionImage(const MakeSuperResolutionImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -699,3 +771,39 @@ IvpdClient::SegmentImageOutcomeCallable IvpdClient::segmentImageCallable(const S
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
IvpdClient::UpdateUserBucketConfigOutcome IvpdClient::updateUserBucketConfig(const UpdateUserBucketConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateUserBucketConfigOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateUserBucketConfigOutcome(UpdateUserBucketConfigResult(outcome.result()));
|
||||
else
|
||||
return UpdateUserBucketConfigOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void IvpdClient::updateUserBucketConfigAsync(const UpdateUserBucketConfigRequest& request, const UpdateUserBucketConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateUserBucketConfig(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
IvpdClient::UpdateUserBucketConfigOutcomeCallable IvpdClient::updateUserBucketConfigCallable(const UpdateUserBucketConfigRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateUserBucketConfigOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateUserBucketConfig(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
29
ivpd/src/model/GetUserBucketConfigRequest.cc
Normal file
29
ivpd/src/model/GetUserBucketConfigRequest.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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/ivpd/model/GetUserBucketConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::GetUserBucketConfigRequest;
|
||||
|
||||
GetUserBucketConfigRequest::GetUserBucketConfigRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "GetUserBucketConfig")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetUserBucketConfigRequest::~GetUserBucketConfigRequest()
|
||||
{}
|
||||
|
||||
75
ivpd/src/model/GetUserBucketConfigResult.cc
Normal file
75
ivpd/src/model/GetUserBucketConfigResult.cc
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/GetUserBucketConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
GetUserBucketConfigResult::GetUserBucketConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetUserBucketConfigResult::GetUserBucketConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetUserBucketConfigResult::~GetUserBucketConfigResult()
|
||||
{}
|
||||
|
||||
void GetUserBucketConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDataNode = value["Data"]["DataItem"];
|
||||
for (auto valueDataDataItem : allDataNode)
|
||||
{
|
||||
DataItem dataObject;
|
||||
if(!valueDataDataItem["Region"].isNull())
|
||||
dataObject.region = valueDataDataItem["Region"].asString();
|
||||
if(!valueDataDataItem["RegionName"].isNull())
|
||||
dataObject.regionName = valueDataDataItem["RegionName"].asString();
|
||||
if(!valueDataDataItem["Bucket"].isNull())
|
||||
dataObject.bucket = valueDataDataItem["Bucket"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetUserBucketConfigResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<GetUserBucketConfigResult::DataItem> GetUserBucketConfigResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetUserBucketConfigResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
44
ivpd/src/model/ListUserBucketsRequest.cc
Normal file
44
ivpd/src/model/ListUserBucketsRequest.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/ivpd/model/ListUserBucketsRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::ListUserBucketsRequest;
|
||||
|
||||
ListUserBucketsRequest::ListUserBucketsRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "ListUserBuckets")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListUserBucketsRequest::~ListUserBucketsRequest()
|
||||
{}
|
||||
|
||||
std::vector<ListUserBucketsRequest::Data> ListUserBucketsRequest::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
void ListUserBucketsRequest::setData(const std::vector<Data>& data)
|
||||
{
|
||||
data_ = data;
|
||||
for(int dep1 = 0; dep1!= data.size(); dep1++) {
|
||||
auto dataObj = data.at(dep1);
|
||||
std::string dataObjStr = "Data." + std::to_string(dep1 + 1);
|
||||
setParameter(dataObjStr + ".RegionId", dataObj.regionId);
|
||||
}
|
||||
}
|
||||
|
||||
66
ivpd/src/model/ListUserBucketsResult.cc
Normal file
66
ivpd/src/model/ListUserBucketsResult.cc
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/ListUserBucketsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
ListUserBucketsResult::ListUserBucketsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListUserBucketsResult::ListUserBucketsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListUserBucketsResult::~ListUserBucketsResult()
|
||||
{}
|
||||
|
||||
void ListUserBucketsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["Data"];
|
||||
for (const auto &item : allData)
|
||||
data_.push_back(item.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListUserBucketsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<std::string> ListUserBucketsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListUserBucketsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
45
ivpd/src/model/UpdateUserBucketConfigRequest.cc
Normal file
45
ivpd/src/model/UpdateUserBucketConfigRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/ivpd/model/UpdateUserBucketConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::Ivpd::Model::UpdateUserBucketConfigRequest;
|
||||
|
||||
UpdateUserBucketConfigRequest::UpdateUserBucketConfigRequest() :
|
||||
RpcServiceRequest("ivpd", "2019-06-25", "UpdateUserBucketConfig")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateUserBucketConfigRequest::~UpdateUserBucketConfigRequest()
|
||||
{}
|
||||
|
||||
std::vector<UpdateUserBucketConfigRequest::Data> UpdateUserBucketConfigRequest::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
void UpdateUserBucketConfigRequest::setData(const std::vector<Data>& data)
|
||||
{
|
||||
data_ = data;
|
||||
for(int dep1 = 0; dep1!= data.size(); dep1++) {
|
||||
auto dataObj = data.at(dep1);
|
||||
std::string dataObjStr = "Data." + std::to_string(dep1 + 1);
|
||||
setParameter(dataObjStr + ".Bucket", dataObj.bucket);
|
||||
setParameter(dataObjStr + ".Region", dataObj.region);
|
||||
}
|
||||
}
|
||||
|
||||
75
ivpd/src/model/UpdateUserBucketConfigResult.cc
Normal file
75
ivpd/src/model/UpdateUserBucketConfigResult.cc
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ivpd/model/UpdateUserBucketConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ivpd;
|
||||
using namespace AlibabaCloud::Ivpd::Model;
|
||||
|
||||
UpdateUserBucketConfigResult::UpdateUserBucketConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateUserBucketConfigResult::UpdateUserBucketConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateUserBucketConfigResult::~UpdateUserBucketConfigResult()
|
||||
{}
|
||||
|
||||
void UpdateUserBucketConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDataNode = value["Data"]["DataItem"];
|
||||
for (auto valueDataDataItem : allDataNode)
|
||||
{
|
||||
DataItem dataObject;
|
||||
if(!valueDataDataItem["Region"].isNull())
|
||||
dataObject.region = valueDataDataItem["Region"].asString();
|
||||
if(!valueDataDataItem["RegionName"].isNull())
|
||||
dataObject.regionName = valueDataDataItem["RegionName"].asString();
|
||||
if(!valueDataDataItem["Bucket"].isNull())
|
||||
dataObject.bucket = valueDataDataItem["Bucket"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateUserBucketConfigResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<UpdateUserBucketConfigResult::DataItem> UpdateUserBucketConfigResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string UpdateUserBucketConfigResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user