QueryAppDeviceListRequest.cc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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/iot/model/QueryAppDeviceListRequest.h>
  17. using AlibabaCloud::Iot::Model::QueryAppDeviceListRequest;
  18. QueryAppDeviceListRequest::QueryAppDeviceListRequest() :
  19. RpcServiceRequest("iot", "2018-01-20", "QueryAppDeviceList")
  20. {}
  21. QueryAppDeviceListRequest::~QueryAppDeviceListRequest()
  22. {}
  23. std::vector<std::string> QueryAppDeviceListRequest::getProductKeyList()const
  24. {
  25. return productKeyList_;
  26. }
  27. void QueryAppDeviceListRequest::setProductKeyList(const std::vector<std::string>& productKeyList)
  28. {
  29. productKeyList_ = productKeyList;
  30. for(int i = 0; i!= productKeyList.size(); i++)
  31. setParameter("ProductKeyList."+ std::to_string(i), productKeyList.at(i));
  32. }
  33. std::vector<std::string> QueryAppDeviceListRequest::getCategoryKeyList()const
  34. {
  35. return categoryKeyList_;
  36. }
  37. void QueryAppDeviceListRequest::setCategoryKeyList(const std::vector<std::string>& categoryKeyList)
  38. {
  39. categoryKeyList_ = categoryKeyList;
  40. for(int i = 0; i!= categoryKeyList.size(); i++)
  41. setParameter("CategoryKeyList."+ std::to_string(i), categoryKeyList.at(i));
  42. }
  43. int QueryAppDeviceListRequest::getPageSize()const
  44. {
  45. return pageSize_;
  46. }
  47. void QueryAppDeviceListRequest::setPageSize(int pageSize)
  48. {
  49. pageSize_ = pageSize;
  50. setParameter("PageSize", std::to_string(pageSize));
  51. }
  52. int QueryAppDeviceListRequest::getCurrentPage()const
  53. {
  54. return currentPage_;
  55. }
  56. void QueryAppDeviceListRequest::setCurrentPage(int currentPage)
  57. {
  58. currentPage_ = currentPage;
  59. setParameter("CurrentPage", std::to_string(currentPage));
  60. }
  61. std::string QueryAppDeviceListRequest::getAppKey()const
  62. {
  63. return appKey_;
  64. }
  65. void QueryAppDeviceListRequest::setAppKey(const std::string& appKey)
  66. {
  67. appKey_ = appKey;
  68. setParameter("AppKey", appKey);
  69. }
  70. std::vector<QueryAppDeviceListRequest::TagList> QueryAppDeviceListRequest::getTagList()const
  71. {
  72. return tagList_;
  73. }
  74. void QueryAppDeviceListRequest::setTagList(const std::vector<TagList>& tagList)
  75. {
  76. tagList_ = tagList;
  77. int i = 0;
  78. for(int i = 0; i!= tagList.size(); i++) {
  79. auto obj = tagList.at(i);
  80. std::string str ="TagList."+ std::to_string(i);
  81. setParameter(str + ".TagName", obj.tagName);
  82. setParameter(str + ".TagValue", obj.tagValue);
  83. }
  84. }