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