TagResourcesRequest.cc 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <alibabacloud/eais/model/TagResourcesRequest.h>
  17. using AlibabaCloud::Eais::Model::TagResourcesRequest;
  18. TagResourcesRequest::TagResourcesRequest()
  19. : RpcServiceRequest("eais", "2019-06-24", "TagResources") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. TagResourcesRequest::~TagResourcesRequest() {}
  23. std::vector<std::string> TagResourcesRequest::getResourceId() const {
  24. return resourceId_;
  25. }
  26. void TagResourcesRequest::setResourceId(const std::vector<std::string> &resourceId) {
  27. resourceId_ = resourceId;
  28. }
  29. std::string TagResourcesRequest::getResourceType() const {
  30. return resourceType_;
  31. }
  32. void TagResourcesRequest::setResourceType(const std::string &resourceType) {
  33. resourceType_ = resourceType;
  34. setParameter(std::string("ResourceType"), resourceType);
  35. }
  36. std::string TagResourcesRequest::getRegionId() const {
  37. return regionId_;
  38. }
  39. void TagResourcesRequest::setRegionId(const std::string &regionId) {
  40. regionId_ = regionId;
  41. setParameter(std::string("RegionId"), regionId);
  42. }
  43. std::vector<TagResourcesRequest::Tag> TagResourcesRequest::getTag() const {
  44. return tag_;
  45. }
  46. void TagResourcesRequest::setTag(const std::vector<TagResourcesRequest::Tag> &tag) {
  47. tag_ = tag;
  48. for(int dep1 = 0; dep1 != tag.size(); dep1++) {
  49. auto tagObj = tag.at(dep1);
  50. std::string tagObjStr = std::string("Tag") + "." + std::to_string(dep1 + 1);
  51. setParameter(tagObjStr + ".Value", tagObj.value);
  52. setParameter(tagObjStr + ".Key", tagObj.key);
  53. }
  54. }