1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/organizations/Organizations_EXPORTS.h>
8 #include <aws/organizations/OrganizationsRequest.h>
9 #include <aws/organizations/model/PolicyType.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Organizations
16 {
17 namespace Model
18 {
19 
20   /**
21    */
22   class AWS_ORGANIZATIONS_API ListPoliciesRequest : public OrganizationsRequest
23   {
24   public:
25     ListPoliciesRequest();
26 
27     // Service request name is the Operation name which will send this request out,
28     // each operation should has unique request name, so that we can get operation's name from this request.
29     // Note: this is not true for response, multiple operations may have the same response name,
30     // so we can not get operation's name from response.
GetServiceRequestName()31     inline virtual const char* GetServiceRequestName() const override { return "ListPolicies"; }
32 
33     Aws::String SerializePayload() const override;
34 
35     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36 
37 
38     /**
39      * <p>Specifies the type of policy that you want to include in the response. You
40      * must specify one of the following values:</p> <ul> <li> <p> <a
41      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a>
42      * </p> </li> <li> <p> <a
43      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a>
44      * </p> </li> <li> <p> <a
45      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a>
46      * </p> </li> <li> <p> <a
47      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a>
48      * </p> </li> </ul>
49      */
GetFilter()50     inline const PolicyType& GetFilter() const{ return m_filter; }
51 
52     /**
53      * <p>Specifies the type of policy that you want to include in the response. You
54      * must specify one of the following values:</p> <ul> <li> <p> <a
55      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a>
56      * </p> </li> <li> <p> <a
57      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a>
58      * </p> </li> <li> <p> <a
59      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a>
60      * </p> </li> <li> <p> <a
61      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a>
62      * </p> </li> </ul>
63      */
FilterHasBeenSet()64     inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
65 
66     /**
67      * <p>Specifies the type of policy that you want to include in the response. You
68      * must specify one of the following values:</p> <ul> <li> <p> <a
69      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a>
70      * </p> </li> <li> <p> <a
71      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a>
72      * </p> </li> <li> <p> <a
73      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a>
74      * </p> </li> <li> <p> <a
75      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a>
76      * </p> </li> </ul>
77      */
SetFilter(const PolicyType & value)78     inline void SetFilter(const PolicyType& value) { m_filterHasBeenSet = true; m_filter = value; }
79 
80     /**
81      * <p>Specifies the type of policy that you want to include in the response. You
82      * must specify one of the following values:</p> <ul> <li> <p> <a
83      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a>
84      * </p> </li> <li> <p> <a
85      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a>
86      * </p> </li> <li> <p> <a
87      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a>
88      * </p> </li> <li> <p> <a
89      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a>
90      * </p> </li> </ul>
91      */
SetFilter(PolicyType && value)92     inline void SetFilter(PolicyType&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); }
93 
94     /**
95      * <p>Specifies the type of policy that you want to include in the response. You
96      * must specify one of the following values:</p> <ul> <li> <p> <a
97      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a>
98      * </p> </li> <li> <p> <a
99      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a>
100      * </p> </li> <li> <p> <a
101      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a>
102      * </p> </li> <li> <p> <a
103      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a>
104      * </p> </li> </ul>
105      */
WithFilter(const PolicyType & value)106     inline ListPoliciesRequest& WithFilter(const PolicyType& value) { SetFilter(value); return *this;}
107 
108     /**
109      * <p>Specifies the type of policy that you want to include in the response. You
110      * must specify one of the following values:</p> <ul> <li> <p> <a
111      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a>
112      * </p> </li> <li> <p> <a
113      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a>
114      * </p> </li> <li> <p> <a
115      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a>
116      * </p> </li> <li> <p> <a
117      * href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a>
118      * </p> </li> </ul>
119      */
WithFilter(PolicyType && value)120     inline ListPoliciesRequest& WithFilter(PolicyType&& value) { SetFilter(std::move(value)); return *this;}
121 
122 
123     /**
124      * <p>The parameter for receiving additional results if you receive a
125      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
126      * response indicates that more output is available. Set this parameter to the
127      * value of the previous call's <code>NextToken</code> response to indicate where
128      * the output should continue from.</p>
129      */
GetNextToken()130     inline const Aws::String& GetNextToken() const{ return m_nextToken; }
131 
132     /**
133      * <p>The parameter for receiving additional results if you receive a
134      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
135      * response indicates that more output is available. Set this parameter to the
136      * value of the previous call's <code>NextToken</code> response to indicate where
137      * the output should continue from.</p>
138      */
NextTokenHasBeenSet()139     inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
140 
141     /**
142      * <p>The parameter for receiving additional results if you receive a
143      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
144      * response indicates that more output is available. Set this parameter to the
145      * value of the previous call's <code>NextToken</code> response to indicate where
146      * the output should continue from.</p>
147      */
SetNextToken(const Aws::String & value)148     inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
149 
150     /**
151      * <p>The parameter for receiving additional results if you receive a
152      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
153      * response indicates that more output is available. Set this parameter to the
154      * value of the previous call's <code>NextToken</code> response to indicate where
155      * the output should continue from.</p>
156      */
SetNextToken(Aws::String && value)157     inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
158 
159     /**
160      * <p>The parameter for receiving additional results if you receive a
161      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
162      * response indicates that more output is available. Set this parameter to the
163      * value of the previous call's <code>NextToken</code> response to indicate where
164      * the output should continue from.</p>
165      */
SetNextToken(const char * value)166     inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
167 
168     /**
169      * <p>The parameter for receiving additional results if you receive a
170      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
171      * response indicates that more output is available. Set this parameter to the
172      * value of the previous call's <code>NextToken</code> response to indicate where
173      * the output should continue from.</p>
174      */
WithNextToken(const Aws::String & value)175     inline ListPoliciesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
176 
177     /**
178      * <p>The parameter for receiving additional results if you receive a
179      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
180      * response indicates that more output is available. Set this parameter to the
181      * value of the previous call's <code>NextToken</code> response to indicate where
182      * the output should continue from.</p>
183      */
WithNextToken(Aws::String && value)184     inline ListPoliciesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
185 
186     /**
187      * <p>The parameter for receiving additional results if you receive a
188      * <code>NextToken</code> response in a previous request. A <code>NextToken</code>
189      * response indicates that more output is available. Set this parameter to the
190      * value of the previous call's <code>NextToken</code> response to indicate where
191      * the output should continue from.</p>
192      */
WithNextToken(const char * value)193     inline ListPoliciesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
194 
195 
196     /**
197      * <p>The total number of results that you want included on each page of the
198      * response. If you do not include this parameter, it defaults to a value that is
199      * specific to the operation. If additional items exist beyond the maximum you
200      * specify, the <code>NextToken</code> response element is present and has a value
201      * (is not null). Include that value as the <code>NextToken</code> request
202      * parameter in the next call to the operation to get the next part of the results.
203      * Note that Organizations might return fewer results than the maximum even when
204      * there are more results available. You should check <code>NextToken</code> after
205      * every operation to ensure that you receive all of the results.</p>
206      */
GetMaxResults()207     inline int GetMaxResults() const{ return m_maxResults; }
208 
209     /**
210      * <p>The total number of results that you want included on each page of the
211      * response. If you do not include this parameter, it defaults to a value that is
212      * specific to the operation. If additional items exist beyond the maximum you
213      * specify, the <code>NextToken</code> response element is present and has a value
214      * (is not null). Include that value as the <code>NextToken</code> request
215      * parameter in the next call to the operation to get the next part of the results.
216      * Note that Organizations might return fewer results than the maximum even when
217      * there are more results available. You should check <code>NextToken</code> after
218      * every operation to ensure that you receive all of the results.</p>
219      */
MaxResultsHasBeenSet()220     inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
221 
222     /**
223      * <p>The total number of results that you want included on each page of the
224      * response. If you do not include this parameter, it defaults to a value that is
225      * specific to the operation. If additional items exist beyond the maximum you
226      * specify, the <code>NextToken</code> response element is present and has a value
227      * (is not null). Include that value as the <code>NextToken</code> request
228      * parameter in the next call to the operation to get the next part of the results.
229      * Note that Organizations might return fewer results than the maximum even when
230      * there are more results available. You should check <code>NextToken</code> after
231      * every operation to ensure that you receive all of the results.</p>
232      */
SetMaxResults(int value)233     inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
234 
235     /**
236      * <p>The total number of results that you want included on each page of the
237      * response. If you do not include this parameter, it defaults to a value that is
238      * specific to the operation. If additional items exist beyond the maximum you
239      * specify, the <code>NextToken</code> response element is present and has a value
240      * (is not null). Include that value as the <code>NextToken</code> request
241      * parameter in the next call to the operation to get the next part of the results.
242      * Note that Organizations might return fewer results than the maximum even when
243      * there are more results available. You should check <code>NextToken</code> after
244      * every operation to ensure that you receive all of the results.</p>
245      */
WithMaxResults(int value)246     inline ListPoliciesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
247 
248   private:
249 
250     PolicyType m_filter;
251     bool m_filterHasBeenSet;
252 
253     Aws::String m_nextToken;
254     bool m_nextTokenHasBeenSet;
255 
256     int m_maxResults;
257     bool m_maxResultsHasBeenSet;
258   };
259 
260 } // namespace Model
261 } // namespace Organizations
262 } // namespace Aws
263