ListInstanceRequest.cc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/ots/model/ListInstanceRequest.h>
  17. using AlibabaCloud::Ots::Model::ListInstanceRequest;
  18. ListInstanceRequest::ListInstanceRequest() :
  19. RpcServiceRequest("ots", "2016-06-20", "ListInstance")
  20. {}
  21. ListInstanceRequest::~ListInstanceRequest()
  22. {}
  23. std::string ListInstanceRequest::getAccess_key_id()const
  24. {
  25. return access_key_id_;
  26. }
  27. void ListInstanceRequest::setAccess_key_id(const std::string& access_key_id)
  28. {
  29. access_key_id_ = access_key_id;
  30. setCoreParameter("Access_key_id", access_key_id);
  31. }
  32. long ListInstanceRequest::getResourceOwnerId()const
  33. {
  34. return resourceOwnerId_;
  35. }
  36. void ListInstanceRequest::setResourceOwnerId(long resourceOwnerId)
  37. {
  38. resourceOwnerId_ = resourceOwnerId;
  39. setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
  40. }
  41. long ListInstanceRequest::getPageSize()const
  42. {
  43. return pageSize_;
  44. }
  45. void ListInstanceRequest::setPageSize(long pageSize)
  46. {
  47. pageSize_ = pageSize;
  48. setCoreParameter("PageSize", std::to_string(pageSize));
  49. }
  50. long ListInstanceRequest::getPageNum()const
  51. {
  52. return pageNum_;
  53. }
  54. void ListInstanceRequest::setPageNum(long pageNum)
  55. {
  56. pageNum_ = pageNum;
  57. setCoreParameter("PageNum", std::to_string(pageNum));
  58. }
  59. std::vector<ListInstanceRequest::TagInfo> ListInstanceRequest::getTagInfo()const
  60. {
  61. return tagInfo_;
  62. }
  63. void ListInstanceRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
  64. {
  65. tagInfo_ = tagInfo;
  66. int i = 0;
  67. for(int i = 0; i!= tagInfo.size(); i++) {
  68. auto obj = tagInfo.at(i);
  69. std::string str ="TagInfo."+ std::to_string(i);
  70. setCoreParameter(str + ".TagValue", obj.tagValue);
  71. setCoreParameter(str + ".TagKey", obj.tagKey);
  72. }
  73. }