ListObjectsV2Request.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #pragma once
  17. #include <alibabacloud/oss/Export.h>
  18. #include <alibabacloud/oss/OssRequest.h>
  19. namespace AlibabaCloud
  20. {
  21. namespace OSS
  22. {
  23. class ALIBABACLOUD_OSS_EXPORT ListObjectsV2Request: public OssBucketRequest
  24. {
  25. public:
  26. ListObjectsV2Request(const std::string& bucket):
  27. OssBucketRequest(bucket),
  28. delimiterIsSet_(false),
  29. startAfterIsSet_(false),
  30. continuationTokenIsSet_(false),
  31. maxKeysIsSet_(false),
  32. prefixIsSet_(false),
  33. encodingTypeIsSet_(false),
  34. fetchOwnerIsSet_(false),
  35. requestPayer_(RequestPayer::NotSet)
  36. {
  37. }
  38. void setDelimiter(const std::string& delimiter) { delimiter_ = delimiter; delimiterIsSet_ = true; }
  39. void setStartAfter(const std::string& value) { startAfter_ = value; startAfterIsSet_ = true;}
  40. void setContinuationToken(const std::string& value) { continuationToken_ = value; continuationTokenIsSet_ = true; }
  41. void setMaxKeys(int maxKeys) {maxKeys_ = maxKeys; maxKeysIsSet_ = true;}
  42. void setPrefix(const std::string& prefix) { prefix_ = prefix; prefixIsSet_ = true; }
  43. void setEncodingType(const std::string& type) { encodingType_ = type; encodingTypeIsSet_ = true; }
  44. void setFetchOwner(bool value) { fetchOwner_ = value; fetchOwnerIsSet_ = true; }
  45. void setRequestPayer(RequestPayer value) { requestPayer_ = value; }
  46. protected:
  47. virtual ParameterCollection specialParameters() const;
  48. virtual HeaderCollection specialHeaders() const;
  49. private:
  50. std::string delimiter_;
  51. bool delimiterIsSet_;
  52. std::string startAfter_;
  53. bool startAfterIsSet_;
  54. std::string continuationToken_;
  55. bool continuationTokenIsSet_;
  56. int maxKeys_;
  57. bool maxKeysIsSet_;
  58. std::string prefix_;
  59. bool prefixIsSet_;
  60. std::string encodingType_;
  61. bool encodingTypeIsSet_;
  62. bool fetchOwner_;
  63. bool fetchOwnerIsSet_;
  64. RequestPayer requestPayer_;
  65. };
  66. }
  67. }