Supported UpdateUserBucketConfig.

This commit is contained in:
sdk-team
2020-07-03 23:47:06 +08:00
parent 7107481ad3
commit 4332019dac
17 changed files with 816 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
2020-07-03 Version: 1.36.503
- Supported UpdateUserBucketConfig.
2020-07-03 Version: 1.36.502
- Generated 2017-05-25 for `Dypnsapi`.

View File

@@ -1 +1 @@
1.36.502
1.36.503

View File

@@ -39,8 +39,12 @@ set(ivpd_public_header_model
include/alibabacloud/ivpd/model/GetJobStatusResult.h
include/alibabacloud/ivpd/model/GetRenderResultRequest.h
include/alibabacloud/ivpd/model/GetRenderResultResult.h
include/alibabacloud/ivpd/model/GetUserBucketConfigRequest.h
include/alibabacloud/ivpd/model/GetUserBucketConfigResult.h
include/alibabacloud/ivpd/model/ListPackageDesignModelTypesRequest.h
include/alibabacloud/ivpd/model/ListPackageDesignModelTypesResult.h
include/alibabacloud/ivpd/model/ListUserBucketsRequest.h
include/alibabacloud/ivpd/model/ListUserBucketsResult.h
include/alibabacloud/ivpd/model/MakeSuperResolutionImageRequest.h
include/alibabacloud/ivpd/model/MakeSuperResolutionImageResult.h
include/alibabacloud/ivpd/model/PreviewModelForPackageDesignRequest.h
@@ -56,7 +60,9 @@ set(ivpd_public_header_model
include/alibabacloud/ivpd/model/SegmentBodyRequest.h
include/alibabacloud/ivpd/model/SegmentBodyResult.h
include/alibabacloud/ivpd/model/SegmentImageRequest.h
include/alibabacloud/ivpd/model/SegmentImageResult.h )
include/alibabacloud/ivpd/model/SegmentImageResult.h
include/alibabacloud/ivpd/model/UpdateUserBucketConfigRequest.h
include/alibabacloud/ivpd/model/UpdateUserBucketConfigResult.h )
set(ivpd_src
src/IvpdClient.cc
@@ -78,8 +84,12 @@ set(ivpd_src
src/model/GetJobStatusResult.cc
src/model/GetRenderResultRequest.cc
src/model/GetRenderResultResult.cc
src/model/GetUserBucketConfigRequest.cc
src/model/GetUserBucketConfigResult.cc
src/model/ListPackageDesignModelTypesRequest.cc
src/model/ListPackageDesignModelTypesResult.cc
src/model/ListUserBucketsRequest.cc
src/model/ListUserBucketsResult.cc
src/model/MakeSuperResolutionImageRequest.cc
src/model/MakeSuperResolutionImageResult.cc
src/model/PreviewModelForPackageDesignRequest.cc
@@ -95,7 +105,9 @@ set(ivpd_src
src/model/SegmentBodyRequest.cc
src/model/SegmentBodyResult.cc
src/model/SegmentImageRequest.cc
src/model/SegmentImageResult.cc )
src/model/SegmentImageResult.cc
src/model/UpdateUserBucketConfigRequest.cc
src/model/UpdateUserBucketConfigResult.cc )
add_library(ivpd ${LIB_TYPE}
${ivpd_public_header}

View File

@@ -40,8 +40,12 @@
#include "model/GetJobStatusResult.h"
#include "model/GetRenderResultRequest.h"
#include "model/GetRenderResultResult.h"
#include "model/GetUserBucketConfigRequest.h"
#include "model/GetUserBucketConfigResult.h"
#include "model/ListPackageDesignModelTypesRequest.h"
#include "model/ListPackageDesignModelTypesResult.h"
#include "model/ListUserBucketsRequest.h"
#include "model/ListUserBucketsResult.h"
#include "model/MakeSuperResolutionImageRequest.h"
#include "model/MakeSuperResolutionImageResult.h"
#include "model/PreviewModelForPackageDesignRequest.h"
@@ -58,6 +62,8 @@
#include "model/SegmentBodyResult.h"
#include "model/SegmentImageRequest.h"
#include "model/SegmentImageResult.h"
#include "model/UpdateUserBucketConfigRequest.h"
#include "model/UpdateUserBucketConfigResult.h"
namespace AlibabaCloud
@@ -94,9 +100,15 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetRenderResultResult> GetRenderResultOutcome;
typedef std::future<GetRenderResultOutcome> GetRenderResultOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::GetRenderResultRequest&, const GetRenderResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetRenderResultAsyncHandler;
typedef Outcome<Error, Model::GetUserBucketConfigResult> GetUserBucketConfigOutcome;
typedef std::future<GetUserBucketConfigOutcome> GetUserBucketConfigOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::GetUserBucketConfigRequest&, const GetUserBucketConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetUserBucketConfigAsyncHandler;
typedef Outcome<Error, Model::ListPackageDesignModelTypesResult> ListPackageDesignModelTypesOutcome;
typedef std::future<ListPackageDesignModelTypesOutcome> ListPackageDesignModelTypesOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::ListPackageDesignModelTypesRequest&, const ListPackageDesignModelTypesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPackageDesignModelTypesAsyncHandler;
typedef Outcome<Error, Model::ListUserBucketsResult> ListUserBucketsOutcome;
typedef std::future<ListUserBucketsOutcome> ListUserBucketsOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::ListUserBucketsRequest&, const ListUserBucketsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListUserBucketsAsyncHandler;
typedef Outcome<Error, Model::MakeSuperResolutionImageResult> MakeSuperResolutionImageOutcome;
typedef std::future<MakeSuperResolutionImageOutcome> MakeSuperResolutionImageOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::MakeSuperResolutionImageRequest&, const MakeSuperResolutionImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MakeSuperResolutionImageAsyncHandler;
@@ -121,6 +133,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::SegmentImageResult> SegmentImageOutcome;
typedef std::future<SegmentImageOutcome> SegmentImageOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::SegmentImageRequest&, const SegmentImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentImageAsyncHandler;
typedef Outcome<Error, Model::UpdateUserBucketConfigResult> UpdateUserBucketConfigOutcome;
typedef std::future<UpdateUserBucketConfigOutcome> UpdateUserBucketConfigOutcomeCallable;
typedef std::function<void(const IvpdClient*, const Model::UpdateUserBucketConfigRequest&, const UpdateUserBucketConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateUserBucketConfigAsyncHandler;
IvpdClient(const Credentials &credentials, const ClientConfiguration &configuration);
IvpdClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -153,9 +168,15 @@ namespace AlibabaCloud
GetRenderResultOutcome getRenderResult(const Model::GetRenderResultRequest &request)const;
void getRenderResultAsync(const Model::GetRenderResultRequest& request, const GetRenderResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetRenderResultOutcomeCallable getRenderResultCallable(const Model::GetRenderResultRequest& request) const;
GetUserBucketConfigOutcome getUserBucketConfig(const Model::GetUserBucketConfigRequest &request)const;
void getUserBucketConfigAsync(const Model::GetUserBucketConfigRequest& request, const GetUserBucketConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetUserBucketConfigOutcomeCallable getUserBucketConfigCallable(const Model::GetUserBucketConfigRequest& request) const;
ListPackageDesignModelTypesOutcome listPackageDesignModelTypes(const Model::ListPackageDesignModelTypesRequest &request)const;
void listPackageDesignModelTypesAsync(const Model::ListPackageDesignModelTypesRequest& request, const ListPackageDesignModelTypesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListPackageDesignModelTypesOutcomeCallable listPackageDesignModelTypesCallable(const Model::ListPackageDesignModelTypesRequest& request) const;
ListUserBucketsOutcome listUserBuckets(const Model::ListUserBucketsRequest &request)const;
void listUserBucketsAsync(const Model::ListUserBucketsRequest& request, const ListUserBucketsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListUserBucketsOutcomeCallable listUserBucketsCallable(const Model::ListUserBucketsRequest& request) const;
MakeSuperResolutionImageOutcome makeSuperResolutionImage(const Model::MakeSuperResolutionImageRequest &request)const;
void makeSuperResolutionImageAsync(const Model::MakeSuperResolutionImageRequest& request, const MakeSuperResolutionImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
MakeSuperResolutionImageOutcomeCallable makeSuperResolutionImageCallable(const Model::MakeSuperResolutionImageRequest& request) const;
@@ -180,6 +201,9 @@ namespace AlibabaCloud
SegmentImageOutcome segmentImage(const Model::SegmentImageRequest &request)const;
void segmentImageAsync(const Model::SegmentImageRequest& request, const SegmentImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SegmentImageOutcomeCallable segmentImageCallable(const Model::SegmentImageRequest& request) const;
UpdateUserBucketConfigOutcome updateUserBucketConfig(const Model::UpdateUserBucketConfigRequest &request)const;
void updateUserBucketConfigAsync(const Model::UpdateUserBucketConfigRequest& request, const UpdateUserBucketConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateUserBucketConfigOutcomeCallable updateUserBucketConfigCallable(const Model::UpdateUserBucketConfigRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View 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.
*/
#ifndef ALIBABACLOUD_IVPD_MODEL_GETUSERBUCKETCONFIGREQUEST_H_
#define ALIBABACLOUD_IVPD_MODEL_GETUSERBUCKETCONFIGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT GetUserBucketConfigRequest : public RpcServiceRequest
{
public:
GetUserBucketConfigRequest();
~GetUserBucketConfigRequest();
private:
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_GETUSERBUCKETCONFIGREQUEST_H_

View File

@@ -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_IVPD_MODEL_GETUSERBUCKETCONFIGRESULT_H_
#define ALIBABACLOUD_IVPD_MODEL_GETUSERBUCKETCONFIGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT GetUserBucketConfigResult : public ServiceResult
{
public:
struct DataItem
{
std::string regionName;
std::string bucket;
std::string region;
};
GetUserBucketConfigResult();
explicit GetUserBucketConfigResult(const std::string &payload);
~GetUserBucketConfigResult();
std::string getMessage()const;
std::vector<DataItem> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<DataItem> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_GETUSERBUCKETCONFIGRESULT_H_

View File

@@ -0,0 +1,53 @@
/*
* 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_IVPD_MODEL_LISTUSERBUCKETSREQUEST_H_
#define ALIBABACLOUD_IVPD_MODEL_LISTUSERBUCKETSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT ListUserBucketsRequest : public RpcServiceRequest
{
public:
struct Data
{
std::string regionId;
};
public:
ListUserBucketsRequest();
~ListUserBucketsRequest();
std::vector<Data> getData()const;
void setData(const std::vector<Data>& data);
private:
std::vector<Data> data_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_LISTUSERBUCKETSREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_IVPD_MODEL_LISTUSERBUCKETSRESULT_H_
#define ALIBABACLOUD_IVPD_MODEL_LISTUSERBUCKETSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT ListUserBucketsResult : public ServiceResult
{
public:
ListUserBucketsResult();
explicit ListUserBucketsResult(const std::string &payload);
~ListUserBucketsResult();
std::string getMessage()const;
std::vector<std::string> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<std::string> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_LISTUSERBUCKETSRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IVPD_MODEL_UPDATEUSERBUCKETCONFIGREQUEST_H_
#define ALIBABACLOUD_IVPD_MODEL_UPDATEUSERBUCKETCONFIGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT UpdateUserBucketConfigRequest : public RpcServiceRequest
{
public:
struct Data
{
std::string bucket;
std::string region;
};
public:
UpdateUserBucketConfigRequest();
~UpdateUserBucketConfigRequest();
std::vector<Data> getData()const;
void setData(const std::vector<Data>& data);
private:
std::vector<Data> data_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_UPDATEUSERBUCKETCONFIGREQUEST_H_

View File

@@ -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_IVPD_MODEL_UPDATEUSERBUCKETCONFIGRESULT_H_
#define ALIBABACLOUD_IVPD_MODEL_UPDATEUSERBUCKETCONFIGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ivpd/IvpdExport.h>
namespace AlibabaCloud
{
namespace Ivpd
{
namespace Model
{
class ALIBABACLOUD_IVPD_EXPORT UpdateUserBucketConfigResult : public ServiceResult
{
public:
struct DataItem
{
std::string regionName;
std::string bucket;
std::string region;
};
UpdateUserBucketConfigResult();
explicit UpdateUserBucketConfigResult(const std::string &payload);
~UpdateUserBucketConfigResult();
std::string getMessage()const;
std::vector<DataItem> getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<DataItem> data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_IVPD_MODEL_UPDATEUSERBUCKETCONFIGRESULT_H_

View File

@@ -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();
}

View 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()
{}

View 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_;
}

View 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);
}
}

View 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_;
}

View 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);
}
}

View 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_;
}