AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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#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 OpenSearchService
22{
23namespace Model
24{
25
34 {
35 public:
36 AWS_OPENSEARCHSERVICE_API Duration() = default;
37 AWS_OPENSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue);
38 AWS_OPENSEARCHSERVICE_API Duration& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
40
41
43
46 inline long long GetValue() const { return m_value; }
47 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
48 inline void SetValue(long long value) { m_valueHasBeenSet = true; m_value = value; }
49 inline Duration& WithValue(long long value) { SetValue(value); return *this;}
51
53
56 inline TimeUnit GetUnit() const { return m_unit; }
57 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
58 inline void SetUnit(TimeUnit value) { m_unitHasBeenSet = true; m_unit = value; }
59 inline Duration& WithUnit(TimeUnit value) { SetUnit(value); return *this;}
61 private:
62
63 long long m_value{0};
64 bool m_valueHasBeenSet = false;
65
67 bool m_unitHasBeenSet = false;
68 };
69
70} // namespace Model
71} // namespace OpenSearchService
72} // 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:59
AWS_OPENSEARCHSERVICE_API Duration()=default
Duration & WithValue(long long value)
Definition Duration.h:49
AWS_OPENSEARCHSERVICE_API Duration(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue JsonValue