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/devicefarm/DeviceFarm_EXPORTS.h>
8 #include <aws/devicefarm/model/OfferingStatus.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/DateTime.h>
11 #include <aws/devicefarm/model/MonetaryAmount.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace DeviceFarm
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>Represents the metadata of an offering transaction.</p><p><h3>See Also:</h3>
31    * <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/OfferingTransaction">AWS
33    * API Reference</a></p>
34    */
35   class AWS_DEVICEFARM_API OfferingTransaction
36   {
37   public:
38     OfferingTransaction();
39     OfferingTransaction(Aws::Utils::Json::JsonView jsonValue);
40     OfferingTransaction& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>The status of an offering transaction.</p>
46      */
GetOfferingStatus()47     inline const OfferingStatus& GetOfferingStatus() const{ return m_offeringStatus; }
48 
49     /**
50      * <p>The status of an offering transaction.</p>
51      */
OfferingStatusHasBeenSet()52     inline bool OfferingStatusHasBeenSet() const { return m_offeringStatusHasBeenSet; }
53 
54     /**
55      * <p>The status of an offering transaction.</p>
56      */
SetOfferingStatus(const OfferingStatus & value)57     inline void SetOfferingStatus(const OfferingStatus& value) { m_offeringStatusHasBeenSet = true; m_offeringStatus = value; }
58 
59     /**
60      * <p>The status of an offering transaction.</p>
61      */
SetOfferingStatus(OfferingStatus && value)62     inline void SetOfferingStatus(OfferingStatus&& value) { m_offeringStatusHasBeenSet = true; m_offeringStatus = std::move(value); }
63 
64     /**
65      * <p>The status of an offering transaction.</p>
66      */
WithOfferingStatus(const OfferingStatus & value)67     inline OfferingTransaction& WithOfferingStatus(const OfferingStatus& value) { SetOfferingStatus(value); return *this;}
68 
69     /**
70      * <p>The status of an offering transaction.</p>
71      */
WithOfferingStatus(OfferingStatus && value)72     inline OfferingTransaction& WithOfferingStatus(OfferingStatus&& value) { SetOfferingStatus(std::move(value)); return *this;}
73 
74 
75     /**
76      * <p>The transaction ID of the offering transaction.</p>
77      */
GetTransactionId()78     inline const Aws::String& GetTransactionId() const{ return m_transactionId; }
79 
80     /**
81      * <p>The transaction ID of the offering transaction.</p>
82      */
TransactionIdHasBeenSet()83     inline bool TransactionIdHasBeenSet() const { return m_transactionIdHasBeenSet; }
84 
85     /**
86      * <p>The transaction ID of the offering transaction.</p>
87      */
SetTransactionId(const Aws::String & value)88     inline void SetTransactionId(const Aws::String& value) { m_transactionIdHasBeenSet = true; m_transactionId = value; }
89 
90     /**
91      * <p>The transaction ID of the offering transaction.</p>
92      */
SetTransactionId(Aws::String && value)93     inline void SetTransactionId(Aws::String&& value) { m_transactionIdHasBeenSet = true; m_transactionId = std::move(value); }
94 
95     /**
96      * <p>The transaction ID of the offering transaction.</p>
97      */
SetTransactionId(const char * value)98     inline void SetTransactionId(const char* value) { m_transactionIdHasBeenSet = true; m_transactionId.assign(value); }
99 
100     /**
101      * <p>The transaction ID of the offering transaction.</p>
102      */
WithTransactionId(const Aws::String & value)103     inline OfferingTransaction& WithTransactionId(const Aws::String& value) { SetTransactionId(value); return *this;}
104 
105     /**
106      * <p>The transaction ID of the offering transaction.</p>
107      */
WithTransactionId(Aws::String && value)108     inline OfferingTransaction& WithTransactionId(Aws::String&& value) { SetTransactionId(std::move(value)); return *this;}
109 
110     /**
111      * <p>The transaction ID of the offering transaction.</p>
112      */
WithTransactionId(const char * value)113     inline OfferingTransaction& WithTransactionId(const char* value) { SetTransactionId(value); return *this;}
114 
115 
116     /**
117      * <p>The ID that corresponds to a device offering promotion.</p>
118      */
GetOfferingPromotionId()119     inline const Aws::String& GetOfferingPromotionId() const{ return m_offeringPromotionId; }
120 
121     /**
122      * <p>The ID that corresponds to a device offering promotion.</p>
123      */
OfferingPromotionIdHasBeenSet()124     inline bool OfferingPromotionIdHasBeenSet() const { return m_offeringPromotionIdHasBeenSet; }
125 
126     /**
127      * <p>The ID that corresponds to a device offering promotion.</p>
128      */
SetOfferingPromotionId(const Aws::String & value)129     inline void SetOfferingPromotionId(const Aws::String& value) { m_offeringPromotionIdHasBeenSet = true; m_offeringPromotionId = value; }
130 
131     /**
132      * <p>The ID that corresponds to a device offering promotion.</p>
133      */
SetOfferingPromotionId(Aws::String && value)134     inline void SetOfferingPromotionId(Aws::String&& value) { m_offeringPromotionIdHasBeenSet = true; m_offeringPromotionId = std::move(value); }
135 
136     /**
137      * <p>The ID that corresponds to a device offering promotion.</p>
138      */
SetOfferingPromotionId(const char * value)139     inline void SetOfferingPromotionId(const char* value) { m_offeringPromotionIdHasBeenSet = true; m_offeringPromotionId.assign(value); }
140 
141     /**
142      * <p>The ID that corresponds to a device offering promotion.</p>
143      */
WithOfferingPromotionId(const Aws::String & value)144     inline OfferingTransaction& WithOfferingPromotionId(const Aws::String& value) { SetOfferingPromotionId(value); return *this;}
145 
146     /**
147      * <p>The ID that corresponds to a device offering promotion.</p>
148      */
WithOfferingPromotionId(Aws::String && value)149     inline OfferingTransaction& WithOfferingPromotionId(Aws::String&& value) { SetOfferingPromotionId(std::move(value)); return *this;}
150 
151     /**
152      * <p>The ID that corresponds to a device offering promotion.</p>
153      */
WithOfferingPromotionId(const char * value)154     inline OfferingTransaction& WithOfferingPromotionId(const char* value) { SetOfferingPromotionId(value); return *this;}
155 
156 
157     /**
158      * <p>The date on which an offering transaction was created.</p>
159      */
GetCreatedOn()160     inline const Aws::Utils::DateTime& GetCreatedOn() const{ return m_createdOn; }
161 
162     /**
163      * <p>The date on which an offering transaction was created.</p>
164      */
CreatedOnHasBeenSet()165     inline bool CreatedOnHasBeenSet() const { return m_createdOnHasBeenSet; }
166 
167     /**
168      * <p>The date on which an offering transaction was created.</p>
169      */
SetCreatedOn(const Aws::Utils::DateTime & value)170     inline void SetCreatedOn(const Aws::Utils::DateTime& value) { m_createdOnHasBeenSet = true; m_createdOn = value; }
171 
172     /**
173      * <p>The date on which an offering transaction was created.</p>
174      */
SetCreatedOn(Aws::Utils::DateTime && value)175     inline void SetCreatedOn(Aws::Utils::DateTime&& value) { m_createdOnHasBeenSet = true; m_createdOn = std::move(value); }
176 
177     /**
178      * <p>The date on which an offering transaction was created.</p>
179      */
WithCreatedOn(const Aws::Utils::DateTime & value)180     inline OfferingTransaction& WithCreatedOn(const Aws::Utils::DateTime& value) { SetCreatedOn(value); return *this;}
181 
182     /**
183      * <p>The date on which an offering transaction was created.</p>
184      */
WithCreatedOn(Aws::Utils::DateTime && value)185     inline OfferingTransaction& WithCreatedOn(Aws::Utils::DateTime&& value) { SetCreatedOn(std::move(value)); return *this;}
186 
187 
188     /**
189      * <p>The cost of an offering transaction.</p>
190      */
GetCost()191     inline const MonetaryAmount& GetCost() const{ return m_cost; }
192 
193     /**
194      * <p>The cost of an offering transaction.</p>
195      */
CostHasBeenSet()196     inline bool CostHasBeenSet() const { return m_costHasBeenSet; }
197 
198     /**
199      * <p>The cost of an offering transaction.</p>
200      */
SetCost(const MonetaryAmount & value)201     inline void SetCost(const MonetaryAmount& value) { m_costHasBeenSet = true; m_cost = value; }
202 
203     /**
204      * <p>The cost of an offering transaction.</p>
205      */
SetCost(MonetaryAmount && value)206     inline void SetCost(MonetaryAmount&& value) { m_costHasBeenSet = true; m_cost = std::move(value); }
207 
208     /**
209      * <p>The cost of an offering transaction.</p>
210      */
WithCost(const MonetaryAmount & value)211     inline OfferingTransaction& WithCost(const MonetaryAmount& value) { SetCost(value); return *this;}
212 
213     /**
214      * <p>The cost of an offering transaction.</p>
215      */
WithCost(MonetaryAmount && value)216     inline OfferingTransaction& WithCost(MonetaryAmount&& value) { SetCost(std::move(value)); return *this;}
217 
218   private:
219 
220     OfferingStatus m_offeringStatus;
221     bool m_offeringStatusHasBeenSet;
222 
223     Aws::String m_transactionId;
224     bool m_transactionIdHasBeenSet;
225 
226     Aws::String m_offeringPromotionId;
227     bool m_offeringPromotionIdHasBeenSet;
228 
229     Aws::Utils::DateTime m_createdOn;
230     bool m_createdOnHasBeenSet;
231 
232     MonetaryAmount m_cost;
233     bool m_costHasBeenSet;
234   };
235 
236 } // namespace Model
237 } // namespace DeviceFarm
238 } // namespace Aws
239