AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace ElasticsearchService {
20namespace Model {
21
31class Duration {
32 public:
33 AWS_ELASTICSEARCHSERVICE_API Duration() = default;
34 AWS_ELASTICSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue);
35 AWS_ELASTICSEARCHSERVICE_API Duration& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_ELASTICSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
44 inline long long GetValue() const { return m_value; }
45 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
46 inline void SetValue(long long value) {
47 m_valueHasBeenSet = true;
48 m_value = value;
49 }
50 inline Duration& WithValue(long long value) {
51 SetValue(value);
52 return *this;
53 }
55
57
63 inline TimeUnit GetUnit() const { return m_unit; }
64 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
65 inline void SetUnit(TimeUnit value) {
66 m_unitHasBeenSet = true;
67 m_unit = value;
68 }
69 inline Duration& WithUnit(TimeUnit value) {
70 SetUnit(value);
71 return *this;
72 }
74 private:
75 long long m_value{0};
76
78 bool m_valueHasBeenSet = false;
79 bool m_unitHasBeenSet = false;
80};
81
82} // namespace Model
83} // namespace ElasticsearchService
84} // 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:69
AWS_ELASTICSEARCHSERVICE_API Duration()=default
Duration & WithValue(long long value)
Definition Duration.h:50
Aws::Utils::Json::JsonValue JsonValue