Generated 2018-08-28 for Tag.

This commit is contained in:
sdk-team
2020-06-23 16:23:57 +08:00
parent 942248dfb0
commit 243879b17f
19 changed files with 708 additions and 43 deletions

View File

@@ -1,3 +1,6 @@
2020-06-23 Version: 1.36.475
- Generated 2018-08-28 for `Tag`.
2020-06-23 Version: 1.36.474
- Public beta version.
- Add Api Overseas.

View File

@@ -1 +1 @@
1.36.474
1.36.475

View File

@@ -21,8 +21,12 @@ set(tag_public_header
include/alibabacloud/tag/TagExport.h )
set(tag_public_header_model
include/alibabacloud/tag/model/ListTagKeysRequest.h
include/alibabacloud/tag/model/ListTagKeysResult.h
include/alibabacloud/tag/model/ListTagResourcesRequest.h
include/alibabacloud/tag/model/ListTagResourcesResult.h
include/alibabacloud/tag/model/ListTagValuesRequest.h
include/alibabacloud/tag/model/ListTagValuesResult.h
include/alibabacloud/tag/model/TagResourcesRequest.h
include/alibabacloud/tag/model/TagResourcesResult.h
include/alibabacloud/tag/model/UntagResourcesRequest.h
@@ -30,8 +34,12 @@ set(tag_public_header_model
set(tag_src
src/TagClient.cc
src/model/ListTagKeysRequest.cc
src/model/ListTagKeysResult.cc
src/model/ListTagResourcesRequest.cc
src/model/ListTagResourcesResult.cc
src/model/ListTagValuesRequest.cc
src/model/ListTagValuesResult.cc
src/model/TagResourcesRequest.cc
src/model/TagResourcesResult.cc
src/model/UntagResourcesRequest.cc

View File

@@ -22,8 +22,12 @@
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "TagExport.h"
#include "model/ListTagKeysRequest.h"
#include "model/ListTagKeysResult.h"
#include "model/ListTagResourcesRequest.h"
#include "model/ListTagResourcesResult.h"
#include "model/ListTagValuesRequest.h"
#include "model/ListTagValuesResult.h"
#include "model/TagResourcesRequest.h"
#include "model/TagResourcesResult.h"
#include "model/UntagResourcesRequest.h"
@@ -37,9 +41,15 @@ namespace AlibabaCloud
class ALIBABACLOUD_TAG_EXPORT TagClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::ListTagKeysResult> ListTagKeysOutcome;
typedef std::future<ListTagKeysOutcome> ListTagKeysOutcomeCallable;
typedef std::function<void(const TagClient*, const Model::ListTagKeysRequest&, const ListTagKeysOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagKeysAsyncHandler;
typedef Outcome<Error, Model::ListTagResourcesResult> ListTagResourcesOutcome;
typedef std::future<ListTagResourcesOutcome> ListTagResourcesOutcomeCallable;
typedef std::function<void(const TagClient*, const Model::ListTagResourcesRequest&, const ListTagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagResourcesAsyncHandler;
typedef Outcome<Error, Model::ListTagValuesResult> ListTagValuesOutcome;
typedef std::future<ListTagValuesOutcome> ListTagValuesOutcomeCallable;
typedef std::function<void(const TagClient*, const Model::ListTagValuesRequest&, const ListTagValuesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagValuesAsyncHandler;
typedef Outcome<Error, Model::TagResourcesResult> TagResourcesOutcome;
typedef std::future<TagResourcesOutcome> TagResourcesOutcomeCallable;
typedef std::function<void(const TagClient*, const Model::TagResourcesRequest&, const TagResourcesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TagResourcesAsyncHandler;
@@ -51,9 +61,15 @@ namespace AlibabaCloud
TagClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
TagClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~TagClient();
ListTagKeysOutcome listTagKeys(const Model::ListTagKeysRequest &request)const;
void listTagKeysAsync(const Model::ListTagKeysRequest& request, const ListTagKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTagKeysOutcomeCallable listTagKeysCallable(const Model::ListTagKeysRequest& request) const;
ListTagResourcesOutcome listTagResources(const Model::ListTagResourcesRequest &request)const;
void listTagResourcesAsync(const Model::ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTagResourcesOutcomeCallable listTagResourcesCallable(const Model::ListTagResourcesRequest& request) const;
ListTagValuesOutcome listTagValues(const Model::ListTagValuesRequest &request)const;
void listTagValuesAsync(const Model::ListTagValuesRequest& request, const ListTagValuesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTagValuesOutcomeCallable listTagValuesCallable(const Model::ListTagValuesRequest& request) const;
TagResourcesOutcome tagResources(const Model::TagResourcesRequest &request)const;
void tagResourcesAsync(const Model::TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TagResourcesOutcomeCallable tagResourcesCallable(const Model::TagResourcesRequest& request) const;

View File

@@ -0,0 +1,69 @@
/*
* 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_TAG_MODEL_LISTTAGKEYSREQUEST_H_
#define ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/tag/TagExport.h>
namespace AlibabaCloud
{
namespace Tag
{
namespace Model
{
class ALIBABACLOUD_TAG_EXPORT ListTagKeysRequest : public RpcServiceRequest
{
public:
ListTagKeysRequest();
~ListTagKeysRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getResourceType()const;
void setResourceType(const std::string& resourceType);
std::string getCategory()const;
void setCategory(const std::string& category);
private:
std::string regionId_;
std::string nextToken_;
int pageSize_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string resourceType_;
std::string category_;
};
}
}
}
#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSREQUEST_H_

View File

@@ -0,0 +1,58 @@
/*
* 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_TAG_MODEL_LISTTAGKEYSRESULT_H_
#define ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/tag/TagExport.h>
namespace AlibabaCloud
{
namespace Tag
{
namespace Model
{
class ALIBABACLOUD_TAG_EXPORT ListTagKeysResult : public ServiceResult
{
public:
struct Key
{
std::string category;
std::string key;
};
ListTagKeysResult();
explicit ListTagKeysResult(const std::string &payload);
~ListTagKeysResult();
std::string getNextToken()const;
std::vector<Key> getKeys()const;
protected:
void parse(const std::string &payload);
private:
std::string nextToken_;
std::vector<Key> keys_;
};
}
}
}
#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGKEYSRESULT_H_

View File

@@ -35,8 +35,6 @@ namespace AlibabaCloud
ListTagResourcesRequest();
~ListTagResourcesRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getNextToken()const;
@@ -57,7 +55,6 @@ namespace AlibabaCloud
void setCategory(const std::string& category);
private:
long resourceOwnerId_;
std::string regionId_;
std::string nextToken_;
int pageSize_;

View File

@@ -0,0 +1,69 @@
/*
* 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_TAG_MODEL_LISTTAGVALUESREQUEST_H_
#define ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/tag/TagExport.h>
namespace AlibabaCloud
{
namespace Tag
{
namespace Model
{
class ALIBABACLOUD_TAG_EXPORT ListTagValuesRequest : public RpcServiceRequest
{
public:
ListTagValuesRequest();
~ListTagValuesRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
int getPageSize()const;
void setPageSize(int pageSize);
std::string getKey()const;
void setKey(const std::string& key);
std::string getResourceOwnerAccount()const;
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
std::string getOwnerAccount()const;
void setOwnerAccount(const std::string& ownerAccount);
long getOwnerId()const;
void setOwnerId(long ownerId);
std::string getResourceType()const;
void setResourceType(const std::string& resourceType);
private:
std::string regionId_;
std::string nextToken_;
int pageSize_;
std::string key_;
std::string resourceOwnerAccount_;
std::string ownerAccount_;
long ownerId_;
std::string resourceType_;
};
}
}
}
#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESREQUEST_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_TAG_MODEL_LISTTAGVALUESRESULT_H_
#define ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/tag/TagExport.h>
namespace AlibabaCloud
{
namespace Tag
{
namespace Model
{
class ALIBABACLOUD_TAG_EXPORT ListTagValuesResult : public ServiceResult
{
public:
ListTagValuesResult();
explicit ListTagValuesResult(const std::string &payload);
~ListTagValuesResult();
std::string getNextToken()const;
std::vector<std::string> getValues()const;
protected:
void parse(const std::string &payload);
private:
std::string nextToken_;
std::vector<std::string> values_;
};
}
}
}
#endif // !ALIBABACLOUD_TAG_MODEL_LISTTAGVALUESRESULT_H_

View File

@@ -35,8 +35,6 @@ namespace AlibabaCloud
TagResourcesRequest();
~TagResourcesRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::vector<std::string> getResourceARN()const;
@@ -51,7 +49,6 @@ namespace AlibabaCloud
void setTags(const std::string& tags);
private:
long resourceOwnerId_;
std::string regionId_;
std::vector<std::string> resourceARN_;
std::string resourceOwnerAccount_;

View File

@@ -35,8 +35,6 @@ namespace AlibabaCloud
UntagResourcesRequest();
~UntagResourcesRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::vector<std::string> getResourceARN()const;
@@ -51,7 +49,6 @@ namespace AlibabaCloud
void setTagKey(const std::vector<std::string>& tagKey);
private:
long resourceOwnerId_;
std::string regionId_;
std::vector<std::string> resourceARN_;
std::string resourceOwnerAccount_;

View File

@@ -51,6 +51,42 @@ TagClient::TagClient(const std::string & accessKeyId, const std::string & access
TagClient::~TagClient()
{}
TagClient::ListTagKeysOutcome TagClient::listTagKeys(const ListTagKeysRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTagKeysOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTagKeysOutcome(ListTagKeysResult(outcome.result()));
else
return ListTagKeysOutcome(outcome.error());
}
void TagClient::listTagKeysAsync(const ListTagKeysRequest& request, const ListTagKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTagKeys(request), context);
};
asyncExecute(new Runnable(fn));
}
TagClient::ListTagKeysOutcomeCallable TagClient::listTagKeysCallable(const ListTagKeysRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTagKeysOutcome()>>(
[this, request]()
{
return this->listTagKeys(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
TagClient::ListTagResourcesOutcome TagClient::listTagResources(const ListTagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -87,6 +123,42 @@ TagClient::ListTagResourcesOutcomeCallable TagClient::listTagResourcesCallable(c
return task->get_future();
}
TagClient::ListTagValuesOutcome TagClient::listTagValues(const ListTagValuesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTagValuesOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTagValuesOutcome(ListTagValuesResult(outcome.result()));
else
return ListTagValuesOutcome(outcome.error());
}
void TagClient::listTagValuesAsync(const ListTagValuesRequest& request, const ListTagValuesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTagValues(request), context);
};
asyncExecute(new Runnable(fn));
}
TagClient::ListTagValuesOutcomeCallable TagClient::listTagValuesCallable(const ListTagValuesRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTagValuesOutcome()>>(
[this, request]()
{
return this->listTagValues(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
TagClient::TagResourcesOutcome TagClient::tagResources(const TagResourcesRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,117 @@
/*
* 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/tag/model/ListTagKeysRequest.h>
using AlibabaCloud::Tag::Model::ListTagKeysRequest;
ListTagKeysRequest::ListTagKeysRequest() :
RpcServiceRequest("tag", "2018-08-28", "ListTagKeys")
{
setMethod(HttpRequest::Method::Post);
}
ListTagKeysRequest::~ListTagKeysRequest()
{}
std::string ListTagKeysRequest::getRegionId()const
{
return regionId_;
}
void ListTagKeysRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ListTagKeysRequest::getNextToken()const
{
return nextToken_;
}
void ListTagKeysRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int ListTagKeysRequest::getPageSize()const
{
return pageSize_;
}
void ListTagKeysRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListTagKeysRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ListTagKeysRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ListTagKeysRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ListTagKeysRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long ListTagKeysRequest::getOwnerId()const
{
return ownerId_;
}
void ListTagKeysRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string ListTagKeysRequest::getResourceType()const
{
return resourceType_;
}
void ListTagKeysRequest::setResourceType(const std::string& resourceType)
{
resourceType_ = resourceType;
setParameter("ResourceType", resourceType);
}
std::string ListTagKeysRequest::getCategory()const
{
return category_;
}
void ListTagKeysRequest::setCategory(const std::string& category)
{
category_ = category;
setParameter("Category", category);
}

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/tag/model/ListTagKeysResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Tag;
using namespace AlibabaCloud::Tag::Model;
ListTagKeysResult::ListTagKeysResult() :
ServiceResult()
{}
ListTagKeysResult::ListTagKeysResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTagKeysResult::~ListTagKeysResult()
{}
void ListTagKeysResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allKeysNode = value["Keys"]["Key"];
for (auto valueKeysKey : allKeysNode)
{
Key keysObject;
if(!valueKeysKey["Category"].isNull())
keysObject.category = valueKeysKey["Category"].asString();
if(!valueKeysKey["Key"].isNull())
keysObject.key = valueKeysKey["Key"].asString();
keys_.push_back(keysObject);
}
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string ListTagKeysResult::getNextToken()const
{
return nextToken_;
}
std::vector<ListTagKeysResult::Key> ListTagKeysResult::getKeys()const
{
return keys_;
}

View File

@@ -27,17 +27,6 @@ ListTagResourcesRequest::ListTagResourcesRequest() :
ListTagResourcesRequest::~ListTagResourcesRequest()
{}
long ListTagResourcesRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ListTagResourcesRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ListTagResourcesRequest::getRegionId()const
{
return regionId_;

View File

@@ -0,0 +1,117 @@
/*
* 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/tag/model/ListTagValuesRequest.h>
using AlibabaCloud::Tag::Model::ListTagValuesRequest;
ListTagValuesRequest::ListTagValuesRequest() :
RpcServiceRequest("tag", "2018-08-28", "ListTagValues")
{
setMethod(HttpRequest::Method::Post);
}
ListTagValuesRequest::~ListTagValuesRequest()
{}
std::string ListTagValuesRequest::getRegionId()const
{
return regionId_;
}
void ListTagValuesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ListTagValuesRequest::getNextToken()const
{
return nextToken_;
}
void ListTagValuesRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
int ListTagValuesRequest::getPageSize()const
{
return pageSize_;
}
void ListTagValuesRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListTagValuesRequest::getKey()const
{
return key_;
}
void ListTagValuesRequest::setKey(const std::string& key)
{
key_ = key;
setParameter("Key", key);
}
std::string ListTagValuesRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ListTagValuesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ListTagValuesRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ListTagValuesRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setParameter("OwnerAccount", ownerAccount);
}
long ListTagValuesRequest::getOwnerId()const
{
return ownerId_;
}
void ListTagValuesRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setParameter("OwnerId", std::to_string(ownerId));
}
std::string ListTagValuesRequest::getResourceType()const
{
return resourceType_;
}
void ListTagValuesRequest::setResourceType(const std::string& resourceType)
{
resourceType_ = resourceType;
setParameter("ResourceType", resourceType);
}

View File

@@ -0,0 +1,59 @@
/*
* 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/tag/model/ListTagValuesResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Tag;
using namespace AlibabaCloud::Tag::Model;
ListTagValuesResult::ListTagValuesResult() :
ServiceResult()
{}
ListTagValuesResult::ListTagValuesResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTagValuesResult::~ListTagValuesResult()
{}
void ListTagValuesResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allValues = value["Values"]["Value"];
for (const auto &item : allValues)
values_.push_back(item.asString());
if(!value["NextToken"].isNull())
nextToken_ = value["NextToken"].asString();
}
std::string ListTagValuesResult::getNextToken()const
{
return nextToken_;
}
std::vector<std::string> ListTagValuesResult::getValues()const
{
return values_;
}

View File

@@ -27,17 +27,6 @@ TagResourcesRequest::TagResourcesRequest() :
TagResourcesRequest::~TagResourcesRequest()
{}
long TagResourcesRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void TagResourcesRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string TagResourcesRequest::getRegionId()const
{
return regionId_;

View File

@@ -27,17 +27,6 @@ UntagResourcesRequest::UntagResourcesRequest() :
UntagResourcesRequest::~UntagResourcesRequest()
{}
long UntagResourcesRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void UntagResourcesRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string UntagResourcesRequest::getRegionId()const
{
return regionId_;