AWS SDK for C++

AWS SDK for C++ Version 1.11.929

Loading...
Searching...
No Matches
FieldConfig.h
1
6#pragma once
7#include <aws/amplifyuibuilder/AmplifyUIBuilder_EXPORTS.h>
8#include <aws/amplifyuibuilder/model/FieldInputConfig.h>
9#include <aws/amplifyuibuilder/model/FieldPosition.h>
10#include <aws/amplifyuibuilder/model/FieldValidationConfiguration.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace AmplifyUIBuilder {
24namespace Model {
25
33 public:
34 AWS_AMPLIFYUIBUILDER_API FieldConfig() = default;
35 AWS_AMPLIFYUIBUILDER_API FieldConfig(Aws::Utils::Json::JsonView jsonValue);
36 AWS_AMPLIFYUIBUILDER_API FieldConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_AMPLIFYUIBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetLabel() const { return m_label; }
44 inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; }
45 template <typename LabelT = Aws::String>
46 void SetLabel(LabelT&& value) {
47 m_labelHasBeenSet = true;
48 m_label = std::forward<LabelT>(value);
49 }
50 template <typename LabelT = Aws::String>
51 FieldConfig& WithLabel(LabelT&& value) {
52 SetLabel(std::forward<LabelT>(value));
53 return *this;
54 }
56
58
61 inline const FieldPosition& GetPosition() const { return m_position; }
62 inline bool PositionHasBeenSet() const { return m_positionHasBeenSet; }
63 template <typename PositionT = FieldPosition>
64 void SetPosition(PositionT&& value) {
65 m_positionHasBeenSet = true;
66 m_position = std::forward<PositionT>(value);
67 }
68 template <typename PositionT = FieldPosition>
69 FieldConfig& WithPosition(PositionT&& value) {
70 SetPosition(std::forward<PositionT>(value));
71 return *this;
72 }
74
76
79 inline bool GetExcluded() const { return m_excluded; }
80 inline bool ExcludedHasBeenSet() const { return m_excludedHasBeenSet; }
81 inline void SetExcluded(bool value) {
82 m_excludedHasBeenSet = true;
83 m_excluded = value;
84 }
85 inline FieldConfig& WithExcluded(bool value) {
86 SetExcluded(value);
87 return *this;
88 }
90
92
96 inline const FieldInputConfig& GetInputType() const { return m_inputType; }
97 inline bool InputTypeHasBeenSet() const { return m_inputTypeHasBeenSet; }
98 template <typename InputTypeT = FieldInputConfig>
99 void SetInputType(InputTypeT&& value) {
100 m_inputTypeHasBeenSet = true;
101 m_inputType = std::forward<InputTypeT>(value);
102 }
103 template <typename InputTypeT = FieldInputConfig>
104 FieldConfig& WithInputType(InputTypeT&& value) {
105 SetInputType(std::forward<InputTypeT>(value));
106 return *this;
107 }
109
111
114 inline const Aws::Vector<FieldValidationConfiguration>& GetValidations() const { return m_validations; }
115 inline bool ValidationsHasBeenSet() const { return m_validationsHasBeenSet; }
116 template <typename ValidationsT = Aws::Vector<FieldValidationConfiguration>>
117 void SetValidations(ValidationsT&& value) {
118 m_validationsHasBeenSet = true;
119 m_validations = std::forward<ValidationsT>(value);
120 }
121 template <typename ValidationsT = Aws::Vector<FieldValidationConfiguration>>
122 FieldConfig& WithValidations(ValidationsT&& value) {
123 SetValidations(std::forward<ValidationsT>(value));
124 return *this;
125 }
126 template <typename ValidationsT = FieldValidationConfiguration>
127 FieldConfig& AddValidations(ValidationsT&& value) {
128 m_validationsHasBeenSet = true;
129 m_validations.emplace_back(std::forward<ValidationsT>(value));
130 return *this;
131 }
133 private:
134 Aws::String m_label;
135
136 FieldPosition m_position;
137
138 bool m_excluded{false};
139
140 FieldInputConfig m_inputType;
141
143 bool m_labelHasBeenSet = false;
144 bool m_positionHasBeenSet = false;
145 bool m_excludedHasBeenSet = false;
146 bool m_inputTypeHasBeenSet = false;
147 bool m_validationsHasBeenSet = false;
148};
149
150} // namespace Model
151} // namespace AmplifyUIBuilder
152} // namespace Aws
FieldConfig & WithInputType(InputTypeT &&value)
void SetValidations(ValidationsT &&value)
AWS_AMPLIFYUIBUILDER_API FieldConfig()=default
const Aws::String & GetLabel() const
Definition FieldConfig.h:43
AWS_AMPLIFYUIBUILDER_API FieldConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
FieldConfig & WithPosition(PositionT &&value)
Definition FieldConfig.h:69
const FieldPosition & GetPosition() const
Definition FieldConfig.h:61
FieldConfig & AddValidations(ValidationsT &&value)
AWS_AMPLIFYUIBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const
const FieldInputConfig & GetInputType() const
Definition FieldConfig.h:96
FieldConfig & WithValidations(ValidationsT &&value)
const Aws::Vector< FieldValidationConfiguration > & GetValidations() const
void SetInputType(InputTypeT &&value)
Definition FieldConfig.h:99
FieldConfig & WithExcluded(bool value)
Definition FieldConfig.h:85
AWS_AMPLIFYUIBUILDER_API FieldConfig(Aws::Utils::Json::JsonView jsonValue)
FieldConfig & WithLabel(LabelT &&value)
Definition FieldConfig.h:51
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue