AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Duration.h
1
6#pragma once
7#include <aws/opensearch/OpenSearchService_EXPORTS.h>
8#include <aws/opensearch/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 OpenSearchService {
20namespace Model {
21
29class Duration {
30 public:
31 AWS_OPENSEARCHSERVICE_API Duration() = default;
32 AWS_OPENSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue);
33 AWS_OPENSEARCHSERVICE_API Duration& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline long long GetValue() const { return m_value; }
41 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
42 inline void SetValue(long long value) {
43 m_valueHasBeenSet = true;
44 m_value = value;
45 }
46 inline Duration& WithValue(long long value) {
47 SetValue(value);
48 return *this;
49 }
51
53
56 inline TimeUnit GetUnit() const { return m_unit; }
57 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
58 inline void SetUnit(TimeUnit value) {
59 m_unitHasBeenSet = true;
60 m_unit = value;
61 }
62 inline Duration& WithUnit(TimeUnit value) {
63 SetUnit(value);
64 return *this;
65 }
67 private:
68 long long m_value{0};
69
71 bool m_valueHasBeenSet = false;
72 bool m_unitHasBeenSet = false;
73};
74
75} // namespace Model
76} // namespace OpenSearchService
77} // namespace Aws
AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_OPENSEARCHSERVICE_API Duration & operator=(Aws::Utils::Json::JsonView jsonValue)
Duration & WithUnit(TimeUnit value)
Definition Duration.h:62
AWS_OPENSEARCHSERVICE_API Duration()=default
Duration & WithValue(long long value)
Definition Duration.h:46
AWS_OPENSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue JsonValue