AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
Duration.h
1
6#pragma once
7#include <aws/es/ElasticsearchService_EXPORTS.h>
8#include <aws/es/model/TimeUnit.h>
9#include <utility>
10
11namespace Aws
12{
13namespace Utils
14{
15namespace Json
16{
17 class JsonValue;
18 class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ElasticsearchService
22{
23namespace Model
24{
25
36 {
37 public:
38 AWS_ELASTICSEARCHSERVICE_API Duration() = default;
39 AWS_ELASTICSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue);
40 AWS_ELASTICSEARCHSERVICE_API Duration& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_ELASTICSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
50 inline long long GetValue() const { return m_value; }
51 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
52 inline void SetValue(long long value) { m_valueHasBeenSet = true; m_value = value; }
53 inline Duration& WithValue(long long value) { SetValue(value); return *this;}
55
57
63 inline TimeUnit GetUnit() const { return m_unit; }
64 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
65 inline void SetUnit(TimeUnit value) { m_unitHasBeenSet = true; m_unit = value; }
66 inline Duration& WithUnit(TimeUnit value) { SetUnit(value); return *this;}
68 private:
69
70 long long m_value{0};
71 bool m_valueHasBeenSet = false;
72
74 bool m_unitHasBeenSet = false;
75 };
76
77} // namespace Model
78} // namespace ElasticsearchService
79} // namespace Aws
AWS_ELASTICSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_ELASTICSEARCHSERVICE_API Duration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_ELASTICSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue)
Duration & WithUnit(TimeUnit value)
Definition Duration.h:66
AWS_ELASTICSEARCHSERVICE_API Duration()=default
Duration & WithValue(long long value)
Definition Duration.h:53
Aws::Utils::Json::JsonValue JsonValue