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

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