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/medialive/MediaLive_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/medialive/model/OfferingDurationUnits.h>
10 #include <aws/medialive/model/OfferingType.h>
11 #include <aws/medialive/model/ReservationResourceSpecification.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 MediaLive
25 {
26 namespace Model
27 {
28 
29   /**
30    * Reserved resources available for purchase<p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Offering">AWS
32    * API Reference</a></p>
33    */
34   class AWS_MEDIALIVE_API Offering
35   {
36   public:
37     Offering();
38     Offering(Aws::Utils::Json::JsonView jsonValue);
39     Offering& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * Unique offering ARN, e.g.
45      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
46      */
GetArn()47     inline const Aws::String& GetArn() const{ return m_arn; }
48 
49     /**
50      * Unique offering ARN, e.g.
51      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
52      */
ArnHasBeenSet()53     inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
54 
55     /**
56      * Unique offering ARN, e.g.
57      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
58      */
SetArn(const Aws::String & value)59     inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
60 
61     /**
62      * Unique offering ARN, e.g.
63      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
64      */
SetArn(Aws::String && value)65     inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
66 
67     /**
68      * Unique offering ARN, e.g.
69      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
70      */
SetArn(const char * value)71     inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
72 
73     /**
74      * Unique offering ARN, e.g.
75      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
76      */
WithArn(const Aws::String & value)77     inline Offering& WithArn(const Aws::String& value) { SetArn(value); return *this;}
78 
79     /**
80      * Unique offering ARN, e.g.
81      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
82      */
WithArn(Aws::String && value)83     inline Offering& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
84 
85     /**
86      * Unique offering ARN, e.g.
87      * 'arn:aws:medialive:us-west-2:123456789012:offering:87654321'
88      */
WithArn(const char * value)89     inline Offering& WithArn(const char* value) { SetArn(value); return *this;}
90 
91 
92     /**
93      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
94      */
GetCurrencyCode()95     inline const Aws::String& GetCurrencyCode() const{ return m_currencyCode; }
96 
97     /**
98      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
99      */
CurrencyCodeHasBeenSet()100     inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
101 
102     /**
103      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
104      */
SetCurrencyCode(const Aws::String & value)105     inline void SetCurrencyCode(const Aws::String& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
106 
107     /**
108      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
109      */
SetCurrencyCode(Aws::String && value)110     inline void SetCurrencyCode(Aws::String&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
111 
112     /**
113      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
114      */
SetCurrencyCode(const char * value)115     inline void SetCurrencyCode(const char* value) { m_currencyCodeHasBeenSet = true; m_currencyCode.assign(value); }
116 
117     /**
118      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
119      */
WithCurrencyCode(const Aws::String & value)120     inline Offering& WithCurrencyCode(const Aws::String& value) { SetCurrencyCode(value); return *this;}
121 
122     /**
123      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
124      */
WithCurrencyCode(Aws::String && value)125     inline Offering& WithCurrencyCode(Aws::String&& value) { SetCurrencyCode(std::move(value)); return *this;}
126 
127     /**
128      * Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD'
129      */
WithCurrencyCode(const char * value)130     inline Offering& WithCurrencyCode(const char* value) { SetCurrencyCode(value); return *this;}
131 
132 
133     /**
134      * Lease duration, e.g. '12'
135      */
GetDuration()136     inline int GetDuration() const{ return m_duration; }
137 
138     /**
139      * Lease duration, e.g. '12'
140      */
DurationHasBeenSet()141     inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
142 
143     /**
144      * Lease duration, e.g. '12'
145      */
SetDuration(int value)146     inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
147 
148     /**
149      * Lease duration, e.g. '12'
150      */
WithDuration(int value)151     inline Offering& WithDuration(int value) { SetDuration(value); return *this;}
152 
153 
154     /**
155      * Units for duration, e.g. 'MONTHS'
156      */
GetDurationUnits()157     inline const OfferingDurationUnits& GetDurationUnits() const{ return m_durationUnits; }
158 
159     /**
160      * Units for duration, e.g. 'MONTHS'
161      */
DurationUnitsHasBeenSet()162     inline bool DurationUnitsHasBeenSet() const { return m_durationUnitsHasBeenSet; }
163 
164     /**
165      * Units for duration, e.g. 'MONTHS'
166      */
SetDurationUnits(const OfferingDurationUnits & value)167     inline void SetDurationUnits(const OfferingDurationUnits& value) { m_durationUnitsHasBeenSet = true; m_durationUnits = value; }
168 
169     /**
170      * Units for duration, e.g. 'MONTHS'
171      */
SetDurationUnits(OfferingDurationUnits && value)172     inline void SetDurationUnits(OfferingDurationUnits&& value) { m_durationUnitsHasBeenSet = true; m_durationUnits = std::move(value); }
173 
174     /**
175      * Units for duration, e.g. 'MONTHS'
176      */
WithDurationUnits(const OfferingDurationUnits & value)177     inline Offering& WithDurationUnits(const OfferingDurationUnits& value) { SetDurationUnits(value); return *this;}
178 
179     /**
180      * Units for duration, e.g. 'MONTHS'
181      */
WithDurationUnits(OfferingDurationUnits && value)182     inline Offering& WithDurationUnits(OfferingDurationUnits&& value) { SetDurationUnits(std::move(value)); return *this;}
183 
184 
185     /**
186      * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
187      */
GetFixedPrice()188     inline double GetFixedPrice() const{ return m_fixedPrice; }
189 
190     /**
191      * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
192      */
FixedPriceHasBeenSet()193     inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
194 
195     /**
196      * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
197      */
SetFixedPrice(double value)198     inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; }
199 
200     /**
201      * One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering
202      */
WithFixedPrice(double value)203     inline Offering& WithFixedPrice(double value) { SetFixedPrice(value); return *this;}
204 
205 
206     /**
207      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
208      * in US West (Oregon)'
209      */
GetOfferingDescription()210     inline const Aws::String& GetOfferingDescription() const{ return m_offeringDescription; }
211 
212     /**
213      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
214      * in US West (Oregon)'
215      */
OfferingDescriptionHasBeenSet()216     inline bool OfferingDescriptionHasBeenSet() const { return m_offeringDescriptionHasBeenSet; }
217 
218     /**
219      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
220      * in US West (Oregon)'
221      */
SetOfferingDescription(const Aws::String & value)222     inline void SetOfferingDescription(const Aws::String& value) { m_offeringDescriptionHasBeenSet = true; m_offeringDescription = value; }
223 
224     /**
225      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
226      * in US West (Oregon)'
227      */
SetOfferingDescription(Aws::String && value)228     inline void SetOfferingDescription(Aws::String&& value) { m_offeringDescriptionHasBeenSet = true; m_offeringDescription = std::move(value); }
229 
230     /**
231      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
232      * in US West (Oregon)'
233      */
SetOfferingDescription(const char * value)234     inline void SetOfferingDescription(const char* value) { m_offeringDescriptionHasBeenSet = true; m_offeringDescription.assign(value); }
235 
236     /**
237      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
238      * in US West (Oregon)'
239      */
WithOfferingDescription(const Aws::String & value)240     inline Offering& WithOfferingDescription(const Aws::String& value) { SetOfferingDescription(value); return *this;}
241 
242     /**
243      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
244      * in US West (Oregon)'
245      */
WithOfferingDescription(Aws::String && value)246     inline Offering& WithOfferingDescription(Aws::String&& value) { SetOfferingDescription(std::move(value)); return *this;}
247 
248     /**
249      * Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard VQ
250      * in US West (Oregon)'
251      */
WithOfferingDescription(const char * value)252     inline Offering& WithOfferingDescription(const char* value) { SetOfferingDescription(value); return *this;}
253 
254 
255     /**
256      * Unique offering ID, e.g. '87654321'
257      */
GetOfferingId()258     inline const Aws::String& GetOfferingId() const{ return m_offeringId; }
259 
260     /**
261      * Unique offering ID, e.g. '87654321'
262      */
OfferingIdHasBeenSet()263     inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
264 
265     /**
266      * Unique offering ID, e.g. '87654321'
267      */
SetOfferingId(const Aws::String & value)268     inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; }
269 
270     /**
271      * Unique offering ID, e.g. '87654321'
272      */
SetOfferingId(Aws::String && value)273     inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); }
274 
275     /**
276      * Unique offering ID, e.g. '87654321'
277      */
SetOfferingId(const char * value)278     inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); }
279 
280     /**
281      * Unique offering ID, e.g. '87654321'
282      */
WithOfferingId(const Aws::String & value)283     inline Offering& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;}
284 
285     /**
286      * Unique offering ID, e.g. '87654321'
287      */
WithOfferingId(Aws::String && value)288     inline Offering& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;}
289 
290     /**
291      * Unique offering ID, e.g. '87654321'
292      */
WithOfferingId(const char * value)293     inline Offering& WithOfferingId(const char* value) { SetOfferingId(value); return *this;}
294 
295 
296     /**
297      * Offering type, e.g. 'NO_UPFRONT'
298      */
GetOfferingType()299     inline const OfferingType& GetOfferingType() const{ return m_offeringType; }
300 
301     /**
302      * Offering type, e.g. 'NO_UPFRONT'
303      */
OfferingTypeHasBeenSet()304     inline bool OfferingTypeHasBeenSet() const { return m_offeringTypeHasBeenSet; }
305 
306     /**
307      * Offering type, e.g. 'NO_UPFRONT'
308      */
SetOfferingType(const OfferingType & value)309     inline void SetOfferingType(const OfferingType& value) { m_offeringTypeHasBeenSet = true; m_offeringType = value; }
310 
311     /**
312      * Offering type, e.g. 'NO_UPFRONT'
313      */
SetOfferingType(OfferingType && value)314     inline void SetOfferingType(OfferingType&& value) { m_offeringTypeHasBeenSet = true; m_offeringType = std::move(value); }
315 
316     /**
317      * Offering type, e.g. 'NO_UPFRONT'
318      */
WithOfferingType(const OfferingType & value)319     inline Offering& WithOfferingType(const OfferingType& value) { SetOfferingType(value); return *this;}
320 
321     /**
322      * Offering type, e.g. 'NO_UPFRONT'
323      */
WithOfferingType(OfferingType && value)324     inline Offering& WithOfferingType(OfferingType&& value) { SetOfferingType(std::move(value)); return *this;}
325 
326 
327     /**
328      * AWS region, e.g. 'us-west-2'
329      */
GetRegion()330     inline const Aws::String& GetRegion() const{ return m_region; }
331 
332     /**
333      * AWS region, e.g. 'us-west-2'
334      */
RegionHasBeenSet()335     inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
336 
337     /**
338      * AWS region, e.g. 'us-west-2'
339      */
SetRegion(const Aws::String & value)340     inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; }
341 
342     /**
343      * AWS region, e.g. 'us-west-2'
344      */
SetRegion(Aws::String && value)345     inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); }
346 
347     /**
348      * AWS region, e.g. 'us-west-2'
349      */
SetRegion(const char * value)350     inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); }
351 
352     /**
353      * AWS region, e.g. 'us-west-2'
354      */
WithRegion(const Aws::String & value)355     inline Offering& WithRegion(const Aws::String& value) { SetRegion(value); return *this;}
356 
357     /**
358      * AWS region, e.g. 'us-west-2'
359      */
WithRegion(Aws::String && value)360     inline Offering& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;}
361 
362     /**
363      * AWS region, e.g. 'us-west-2'
364      */
WithRegion(const char * value)365     inline Offering& WithRegion(const char* value) { SetRegion(value); return *this;}
366 
367 
368     /**
369      * Resource configuration details
370      */
GetResourceSpecification()371     inline const ReservationResourceSpecification& GetResourceSpecification() const{ return m_resourceSpecification; }
372 
373     /**
374      * Resource configuration details
375      */
ResourceSpecificationHasBeenSet()376     inline bool ResourceSpecificationHasBeenSet() const { return m_resourceSpecificationHasBeenSet; }
377 
378     /**
379      * Resource configuration details
380      */
SetResourceSpecification(const ReservationResourceSpecification & value)381     inline void SetResourceSpecification(const ReservationResourceSpecification& value) { m_resourceSpecificationHasBeenSet = true; m_resourceSpecification = value; }
382 
383     /**
384      * Resource configuration details
385      */
SetResourceSpecification(ReservationResourceSpecification && value)386     inline void SetResourceSpecification(ReservationResourceSpecification&& value) { m_resourceSpecificationHasBeenSet = true; m_resourceSpecification = std::move(value); }
387 
388     /**
389      * Resource configuration details
390      */
WithResourceSpecification(const ReservationResourceSpecification & value)391     inline Offering& WithResourceSpecification(const ReservationResourceSpecification& value) { SetResourceSpecification(value); return *this;}
392 
393     /**
394      * Resource configuration details
395      */
WithResourceSpecification(ReservationResourceSpecification && value)396     inline Offering& WithResourceSpecification(ReservationResourceSpecification&& value) { SetResourceSpecification(std::move(value)); return *this;}
397 
398 
399     /**
400      * Recurring usage charge for each reserved resource, e.g. '157.0'
401      */
GetUsagePrice()402     inline double GetUsagePrice() const{ return m_usagePrice; }
403 
404     /**
405      * Recurring usage charge for each reserved resource, e.g. '157.0'
406      */
UsagePriceHasBeenSet()407     inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
408 
409     /**
410      * Recurring usage charge for each reserved resource, e.g. '157.0'
411      */
SetUsagePrice(double value)412     inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; }
413 
414     /**
415      * Recurring usage charge for each reserved resource, e.g. '157.0'
416      */
WithUsagePrice(double value)417     inline Offering& WithUsagePrice(double value) { SetUsagePrice(value); return *this;}
418 
419   private:
420 
421     Aws::String m_arn;
422     bool m_arnHasBeenSet;
423 
424     Aws::String m_currencyCode;
425     bool m_currencyCodeHasBeenSet;
426 
427     int m_duration;
428     bool m_durationHasBeenSet;
429 
430     OfferingDurationUnits m_durationUnits;
431     bool m_durationUnitsHasBeenSet;
432 
433     double m_fixedPrice;
434     bool m_fixedPriceHasBeenSet;
435 
436     Aws::String m_offeringDescription;
437     bool m_offeringDescriptionHasBeenSet;
438 
439     Aws::String m_offeringId;
440     bool m_offeringIdHasBeenSet;
441 
442     OfferingType m_offeringType;
443     bool m_offeringTypeHasBeenSet;
444 
445     Aws::String m_region;
446     bool m_regionHasBeenSet;
447 
448     ReservationResourceSpecification m_resourceSpecification;
449     bool m_resourceSpecificationHasBeenSet;
450 
451     double m_usagePrice;
452     bool m_usagePriceHasBeenSet;
453   };
454 
455 } // namespace Model
456 } // namespace MediaLive
457 } // namespace Aws
458