AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ShareRule.h
1
6#pragma once
7#include <aws/dlm/DLM_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/dlm/model/RetentionIntervalUnitValues.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace DLM
24{
25namespace Model
26{
27
35 {
36 public:
37 AWS_DLM_API ShareRule() = default;
38 AWS_DLM_API ShareRule(Aws::Utils::Json::JsonView jsonValue);
41
42
44
48 inline const Aws::Vector<Aws::String>& GetTargetAccounts() const { return m_targetAccounts; }
49 inline bool TargetAccountsHasBeenSet() const { return m_targetAccountsHasBeenSet; }
50 template<typename TargetAccountsT = Aws::Vector<Aws::String>>
51 void SetTargetAccounts(TargetAccountsT&& value) { m_targetAccountsHasBeenSet = true; m_targetAccounts = std::forward<TargetAccountsT>(value); }
52 template<typename TargetAccountsT = Aws::Vector<Aws::String>>
53 ShareRule& WithTargetAccounts(TargetAccountsT&& value) { SetTargetAccounts(std::forward<TargetAccountsT>(value)); return *this;}
54 template<typename TargetAccountsT = Aws::String>
55 ShareRule& AddTargetAccounts(TargetAccountsT&& value) { m_targetAccountsHasBeenSet = true; m_targetAccounts.emplace_back(std::forward<TargetAccountsT>(value)); return *this; }
57
59
63 inline int GetUnshareInterval() const { return m_unshareInterval; }
64 inline bool UnshareIntervalHasBeenSet() const { return m_unshareIntervalHasBeenSet; }
65 inline void SetUnshareInterval(int value) { m_unshareIntervalHasBeenSet = true; m_unshareInterval = value; }
66 inline ShareRule& WithUnshareInterval(int value) { SetUnshareInterval(value); return *this;}
68
70
73 inline RetentionIntervalUnitValues GetUnshareIntervalUnit() const { return m_unshareIntervalUnit; }
74 inline bool UnshareIntervalUnitHasBeenSet() const { return m_unshareIntervalUnitHasBeenSet; }
75 inline void SetUnshareIntervalUnit(RetentionIntervalUnitValues value) { m_unshareIntervalUnitHasBeenSet = true; m_unshareIntervalUnit = value; }
78 private:
79
80 Aws::Vector<Aws::String> m_targetAccounts;
81 bool m_targetAccountsHasBeenSet = false;
82
83 int m_unshareInterval{0};
84 bool m_unshareIntervalHasBeenSet = false;
85
87 bool m_unshareIntervalUnitHasBeenSet = false;
88 };
89
90} // namespace Model
91} // namespace DLM
92} // namespace Aws
AWS_DLM_API ShareRule()=default
bool TargetAccountsHasBeenSet() const
Definition ShareRule.h:49
void SetUnshareInterval(int value)
Definition ShareRule.h:65
AWS_DLM_API ShareRule & operator=(Aws::Utils::Json::JsonView jsonValue)
ShareRule & WithTargetAccounts(TargetAccountsT &&value)
Definition ShareRule.h:53
RetentionIntervalUnitValues GetUnshareIntervalUnit() const
Definition ShareRule.h:73
void SetUnshareIntervalUnit(RetentionIntervalUnitValues value)
Definition ShareRule.h:75
const Aws::Vector< Aws::String > & GetTargetAccounts() const
Definition ShareRule.h:48
bool UnshareIntervalHasBeenSet() const
Definition ShareRule.h:64
AWS_DLM_API Aws::Utils::Json::JsonValue Jsonize() const
ShareRule & AddTargetAccounts(TargetAccountsT &&value)
Definition ShareRule.h:55
AWS_DLM_API ShareRule(Aws::Utils::Json::JsonView jsonValue)
ShareRule & WithUnshareIntervalUnit(RetentionIntervalUnitValues value)
Definition ShareRule.h:76
bool UnshareIntervalUnitHasBeenSet() const
Definition ShareRule.h:74
int GetUnshareInterval() const
Definition ShareRule.h:63
void SetTargetAccounts(TargetAccountsT &&value)
Definition ShareRule.h:51
ShareRule & WithUnshareInterval(int value)
Definition ShareRule.h:66
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue