AWS SDK for C++

AWS SDK for C++ Version 1.11.913

Loading...
Searching...
No Matches
DateTimeRange.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/health/Health_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Cbor {
16class CborValue;
17} // namespace Cbor
18} // namespace Utils
19namespace Health {
20namespace Model {
21
39 public:
40 AWS_HEALTH_API DateTimeRange() = default;
41 AWS_HEALTH_API DateTimeRange(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
42 AWS_HEALTH_API DateTimeRange& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
43 AWS_HEALTH_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
44
46
49 inline const Aws::Utils::DateTime& GetFrom() const { return m_from; }
50 inline bool FromHasBeenSet() const { return m_fromHasBeenSet; }
51 template <typename FromT = Aws::Utils::DateTime>
52 void SetFrom(FromT&& value) {
53 m_fromHasBeenSet = true;
54 m_from = std::forward<FromT>(value);
55 }
56 template <typename FromT = Aws::Utils::DateTime>
57 DateTimeRange& WithFrom(FromT&& value) {
58 SetFrom(std::forward<FromT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::Utils::DateTime& GetTo() const { return m_to; }
68 inline bool ToHasBeenSet() const { return m_toHasBeenSet; }
69 template <typename ToT = Aws::Utils::DateTime>
70 void SetTo(ToT&& value) {
71 m_toHasBeenSet = true;
72 m_to = std::forward<ToT>(value);
73 }
74 template <typename ToT = Aws::Utils::DateTime>
75 DateTimeRange& WithTo(ToT&& value) {
76 SetTo(std::forward<ToT>(value));
77 return *this;
78 }
80 private:
81 Aws::Utils::DateTime m_from{};
82
84 bool m_fromHasBeenSet = false;
85 bool m_toHasBeenSet = false;
86};
87
88} // namespace Model
89} // namespace Health
90} // namespace Aws
const Aws::Utils::DateTime & GetFrom() const
DateTimeRange & WithTo(ToT &&value)
const Aws::Utils::DateTime & GetTo() const
AWS_HEALTH_API DateTimeRange & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_HEALTH_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
DateTimeRange & WithFrom(FromT &&value)
AWS_HEALTH_API DateTimeRange()=default
AWS_HEALTH_API DateTimeRange(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)