AWS SDK for C++  1.9.106
AWS SDK for C++
Duration.h
Go to the documentation of this file.
1 
6 #pragma once
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17  class JsonValue;
18  class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace ElasticsearchService
22 {
23 namespace Model
24 {
25 
36  {
37  public:
42 
43 
49  inline long long GetValue() const{ return m_value; }
50 
56  inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
57 
63  inline void SetValue(long long value) { m_valueHasBeenSet = true; m_value = value; }
64 
70  inline Duration& WithValue(long long value) { SetValue(value); return *this;}
71 
72 
79  inline const TimeUnit& GetUnit() const{ return m_unit; }
80 
87  inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
88 
95  inline void SetUnit(const TimeUnit& value) { m_unitHasBeenSet = true; m_unit = value; }
96 
103  inline void SetUnit(TimeUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); }
104 
111  inline Duration& WithUnit(const TimeUnit& value) { SetUnit(value); return *this;}
112 
119  inline Duration& WithUnit(TimeUnit&& value) { SetUnit(std::move(value)); return *this;}
120 
121  private:
122 
123  long long m_value;
124  bool m_valueHasBeenSet;
125 
126  TimeUnit m_unit;
127  bool m_unitHasBeenSet;
128  };
129 
130 } // namespace Model
131 } // namespace ElasticsearchService
132 } // namespace Aws
Aws::ElasticsearchService::Model::TimeUnit
TimeUnit
Definition: TimeUnit.h:17
Aws::ElasticsearchService::Model::Duration::WithUnit
Duration & WithUnit(TimeUnit &&value)
Definition: Duration.h:119
Aws::ElasticsearchService::Model::Duration::GetValue
long long GetValue() const
Definition: Duration.h:49
Aws::ElasticsearchService::Model::Duration::Duration
Duration()
Aws::ElasticsearchService::Model::Duration::WithValue
Duration & WithValue(long long value)
Definition: Duration.h:70
Aws::ElasticsearchService::Model::Duration::SetUnit
void SetUnit(const TimeUnit &value)
Definition: Duration.h:95
Aws::ElasticsearchService::Model::Duration
Definition: Duration.h:36
AWS_ELASTICSEARCHSERVICE_API
#define AWS_ELASTICSEARCHSERVICE_API
Definition: ElasticsearchService_EXPORTS.h:28
Aws::ElasticsearchService::Model::Duration::operator=
Duration & operator=(Aws::Utils::Json::JsonView jsonValue)
ElasticsearchService_EXPORTS.h
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
Aws::ElasticsearchService::Model::Duration::ValueHasBeenSet
bool ValueHasBeenSet() const
Definition: Duration.h:56
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::ElasticsearchService::Model::Duration::SetUnit
void SetUnit(TimeUnit &&value)
Definition: Duration.h:103
Aws::ElasticsearchService::Model::Duration::GetUnit
const TimeUnit & GetUnit() const
Definition: Duration.h:79
Aws::ElasticsearchService::Model::Duration::SetValue
void SetValue(long long value)
Definition: Duration.h:63
Aws
Definition: AccessManagementClient.h:15
Aws::ElasticsearchService::Model::Duration::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::ElasticsearchService::Model::Duration::WithUnit
Duration & WithUnit(const TimeUnit &value)
Definition: Duration.h:111
TimeUnit.h
Aws::ElasticsearchService::Model::Duration::Duration
Duration(Aws::Utils::Json::JsonView jsonValue)
Aws::ElasticsearchService::Model::Duration::UnitHasBeenSet
bool UnitHasBeenSet() const
Definition: Duration.h:87