SearchInventoryRequest.cc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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/SearchInventoryRequest.h>
  17. using AlibabaCloud::Oos::Model::SearchInventoryRequest;
  18. SearchInventoryRequest::SearchInventoryRequest()
  19. : RpcServiceRequest("oos", "2019-06-01", "SearchInventory") {
  20. setMethod(HttpRequest::Method::Post);
  21. }
  22. SearchInventoryRequest::~SearchInventoryRequest() {}
  23. std::vector<std::string> SearchInventoryRequest::getAggregator() const {
  24. return aggregator_;
  25. }
  26. void SearchInventoryRequest::setAggregator(const std::vector<std::string> &aggregator) {
  27. aggregator_ = aggregator;
  28. }
  29. std::vector<SearchInventoryRequest::Filter> SearchInventoryRequest::getFilter() const {
  30. return filter_;
  31. }
  32. void SearchInventoryRequest::setFilter(const std::vector<SearchInventoryRequest::Filter> &filter) {
  33. filter_ = filter;
  34. for(int dep1 = 0; dep1 != filter.size(); dep1++) {
  35. auto filterObj = filter.at(dep1);
  36. std::string filterObjStr = std::string("Filter") + "." + std::to_string(dep1 + 1);
  37. setParameter(filterObjStr + ".Name", filterObj.name);
  38. setParameter(filterObjStr + ".Operator", filterObj._operator);
  39. }
  40. }
  41. std::string SearchInventoryRequest::getRegionId() const {
  42. return regionId_;
  43. }
  44. void SearchInventoryRequest::setRegionId(const std::string &regionId) {
  45. regionId_ = regionId;
  46. setParameter(std::string("RegionId"), regionId);
  47. }
  48. std::string SearchInventoryRequest::getNextToken() const {
  49. return nextToken_;
  50. }
  51. void SearchInventoryRequest::setNextToken(const std::string &nextToken) {
  52. nextToken_ = nextToken;
  53. setParameter(std::string("NextToken"), nextToken);
  54. }
  55. int SearchInventoryRequest::getMaxResults() const {
  56. return maxResults_;
  57. }
  58. void SearchInventoryRequest::setMaxResults(int maxResults) {
  59. maxResults_ = maxResults;
  60. setParameter(std::string("MaxResults"), std::to_string(maxResults));
  61. }