ListInventoryEntriesRequest.cc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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/oos/model/ListInventoryEntriesRequest.h>
  17. using AlibabaCloud::Oos::Model::ListInventoryEntriesRequest;
  18. ListInventoryEntriesRequest::ListInventoryEntriesRequest() :
  19. RpcServiceRequest("oos", "2019-06-01", "ListInventoryEntries")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. ListInventoryEntriesRequest::~ListInventoryEntriesRequest()
  24. {}
  25. std::vector<ListInventoryEntriesRequest::Filter> ListInventoryEntriesRequest::getFilter()const
  26. {
  27. return filter_;
  28. }
  29. void ListInventoryEntriesRequest::setFilter(const std::vector<Filter>& filter)
  30. {
  31. filter_ = filter;
  32. for(int dep1 = 0; dep1!= filter.size(); dep1++) {
  33. auto filterObj = filter.at(dep1);
  34. std::string filterObjStr = "Filter." + std::to_string(dep1 + 1);
  35. setParameter(filterObjStr + ".Name", filterObj.name);
  36. for(int dep2 = 0; dep2!= filterObj.value.size(); dep2++) {
  37. setParameter(filterObjStr + ".Value."+ std::to_string(dep2), filterObj.value.at(dep2));
  38. }
  39. setParameter(filterObjStr + "._Operator", filterObj._operator);
  40. }
  41. }
  42. std::string ListInventoryEntriesRequest::getInstanceId()const
  43. {
  44. return instanceId_;
  45. }
  46. void ListInventoryEntriesRequest::setInstanceId(const std::string& instanceId)
  47. {
  48. instanceId_ = instanceId;
  49. setParameter("InstanceId", instanceId);
  50. }
  51. std::string ListInventoryEntriesRequest::getNextToken()const
  52. {
  53. return nextToken_;
  54. }
  55. void ListInventoryEntriesRequest::setNextToken(const std::string& nextToken)
  56. {
  57. nextToken_ = nextToken;
  58. setParameter("NextToken", nextToken);
  59. }
  60. int ListInventoryEntriesRequest::getMaxResults()const
  61. {
  62. return maxResults_;
  63. }
  64. void ListInventoryEntriesRequest::setMaxResults(int maxResults)
  65. {
  66. maxResults_ = maxResults;
  67. setParameter("MaxResults", std::to_string(maxResults));
  68. }
  69. std::string ListInventoryEntriesRequest::getTypeName()const
  70. {
  71. return typeName_;
  72. }
  73. void ListInventoryEntriesRequest::setTypeName(const std::string& typeName)
  74. {
  75. typeName_ = typeName;
  76. setParameter("TypeName", typeName);
  77. }