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/codeartifact/CodeArtifact_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSVector.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/codeartifact/model/PackageSummary.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 template<typename RESULT_TYPE>
16 class AmazonWebServiceResult;
17 
18 namespace Utils
19 {
20 namespace Json
21 {
22   class JsonValue;
23 } // namespace Json
24 } // namespace Utils
25 namespace CodeArtifact
26 {
27 namespace Model
28 {
29   class AWS_CODEARTIFACT_API ListPackagesResult
30   {
31   public:
32     ListPackagesResult();
33     ListPackagesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
34     ListPackagesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
35 
36 
37     /**
38      * <p> The list of returned <a
39      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
40      * objects. </p>
41      */
GetPackages()42     inline const Aws::Vector<PackageSummary>& GetPackages() const{ return m_packages; }
43 
44     /**
45      * <p> The list of returned <a
46      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
47      * objects. </p>
48      */
SetPackages(const Aws::Vector<PackageSummary> & value)49     inline void SetPackages(const Aws::Vector<PackageSummary>& value) { m_packages = value; }
50 
51     /**
52      * <p> The list of returned <a
53      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
54      * objects. </p>
55      */
SetPackages(Aws::Vector<PackageSummary> && value)56     inline void SetPackages(Aws::Vector<PackageSummary>&& value) { m_packages = std::move(value); }
57 
58     /**
59      * <p> The list of returned <a
60      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
61      * objects. </p>
62      */
WithPackages(const Aws::Vector<PackageSummary> & value)63     inline ListPackagesResult& WithPackages(const Aws::Vector<PackageSummary>& value) { SetPackages(value); return *this;}
64 
65     /**
66      * <p> The list of returned <a
67      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
68      * objects. </p>
69      */
WithPackages(Aws::Vector<PackageSummary> && value)70     inline ListPackagesResult& WithPackages(Aws::Vector<PackageSummary>&& value) { SetPackages(std::move(value)); return *this;}
71 
72     /**
73      * <p> The list of returned <a
74      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
75      * objects. </p>
76      */
AddPackages(const PackageSummary & value)77     inline ListPackagesResult& AddPackages(const PackageSummary& value) { m_packages.push_back(value); return *this; }
78 
79     /**
80      * <p> The list of returned <a
81      * href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_PackageSummary.html">PackageSummary</a>
82      * objects. </p>
83      */
AddPackages(PackageSummary && value)84     inline ListPackagesResult& AddPackages(PackageSummary&& value) { m_packages.push_back(std::move(value)); return *this; }
85 
86 
87     /**
88      * <p> If there are additional results, this is the token for the next set of
89      * results. </p>
90      */
GetNextToken()91     inline const Aws::String& GetNextToken() const{ return m_nextToken; }
92 
93     /**
94      * <p> If there are additional results, this is the token for the next set of
95      * results. </p>
96      */
SetNextToken(const Aws::String & value)97     inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
98 
99     /**
100      * <p> If there are additional results, this is the token for the next set of
101      * results. </p>
102      */
SetNextToken(Aws::String && value)103     inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
104 
105     /**
106      * <p> If there are additional results, this is the token for the next set of
107      * results. </p>
108      */
SetNextToken(const char * value)109     inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
110 
111     /**
112      * <p> If there are additional results, this is the token for the next set of
113      * results. </p>
114      */
WithNextToken(const Aws::String & value)115     inline ListPackagesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
116 
117     /**
118      * <p> If there are additional results, this is the token for the next set of
119      * results. </p>
120      */
WithNextToken(Aws::String && value)121     inline ListPackagesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
122 
123     /**
124      * <p> If there are additional results, this is the token for the next set of
125      * results. </p>
126      */
WithNextToken(const char * value)127     inline ListPackagesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
128 
129   private:
130 
131     Aws::Vector<PackageSummary> m_packages;
132 
133     Aws::String m_nextToken;
134   };
135 
136 } // namespace Model
137 } // namespace CodeArtifact
138 } // namespace Aws
139