AWS SDK for C++

AWS SDK for C++ Version 1.11.782

Loading...
Searching...
No Matches
TimePeriod.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/sustainability/Sustainability_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace Sustainability {
20namespace Model {
21
29 public:
30 AWS_SUSTAINABILITY_API TimePeriod() = default;
31 AWS_SUSTAINABILITY_API TimePeriod(Aws::Utils::Json::JsonView jsonValue);
32 AWS_SUSTAINABILITY_API TimePeriod& operator=(Aws::Utils::Json::JsonView jsonValue);
33 AWS_SUSTAINABILITY_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
40 inline const Aws::Utils::DateTime& GetStart() const { return m_start; }
41 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
42 template <typename StartT = Aws::Utils::DateTime>
43 void SetStart(StartT&& value) {
44 m_startHasBeenSet = true;
45 m_start = std::forward<StartT>(value);
46 }
47 template <typename StartT = Aws::Utils::DateTime>
48 TimePeriod& WithStart(StartT&& value) {
49 SetStart(std::forward<StartT>(value));
50 return *this;
51 }
53
55
59 inline const Aws::Utils::DateTime& GetEnd() const { return m_end; }
60 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
61 template <typename EndT = Aws::Utils::DateTime>
62 void SetEnd(EndT&& value) {
63 m_endHasBeenSet = true;
64 m_end = std::forward<EndT>(value);
65 }
66 template <typename EndT = Aws::Utils::DateTime>
67 TimePeriod& WithEnd(EndT&& value) {
68 SetEnd(std::forward<EndT>(value));
69 return *this;
70 }
72 private:
73 Aws::Utils::DateTime m_start{};
74
76 bool m_startHasBeenSet = false;
77 bool m_endHasBeenSet = false;
78};
79
80} // namespace Model
81} // namespace Sustainability
82} // namespace Aws
AWS_SUSTAINABILITY_API TimePeriod()=default
AWS_SUSTAINABILITY_API TimePeriod(Aws::Utils::Json::JsonView jsonValue)
AWS_SUSTAINABILITY_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_SUSTAINABILITY_API TimePeriod & operator=(Aws::Utils::Json::JsonView jsonValue)
TimePeriod & WithEnd(EndT &&value)
Definition TimePeriod.h:67
TimePeriod & WithStart(StartT &&value)
Definition TimePeriod.h:48
const Aws::Utils::DateTime & GetStart() const
Definition TimePeriod.h:40
const Aws::Utils::DateTime & GetEnd() const
Definition TimePeriod.h:59
Aws::Utils::Json::JsonValue JsonValue