aws_sdk_quicksight/types/
_parameter_text_field_control.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ParameterTextFieldControl {
7 pub parameter_control_id: ::std::string::String,
9 pub title: ::std::string::String,
11 pub source_parameter_name: ::std::string::String,
13 pub display_options: ::std::option::Option<crate::types::TextFieldControlDisplayOptions>,
15}
16impl ParameterTextFieldControl {
17 pub fn parameter_control_id(&self) -> &str {
19 use std::ops::Deref;
20 self.parameter_control_id.deref()
21 }
22 pub fn title(&self) -> &str {
24 use std::ops::Deref;
25 self.title.deref()
26 }
27 pub fn source_parameter_name(&self) -> &str {
29 use std::ops::Deref;
30 self.source_parameter_name.deref()
31 }
32 pub fn display_options(&self) -> ::std::option::Option<&crate::types::TextFieldControlDisplayOptions> {
34 self.display_options.as_ref()
35 }
36}
37impl ParameterTextFieldControl {
38 pub fn builder() -> crate::types::builders::ParameterTextFieldControlBuilder {
40 crate::types::builders::ParameterTextFieldControlBuilder::default()
41 }
42}
43
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct ParameterTextFieldControlBuilder {
48 pub(crate) parameter_control_id: ::std::option::Option<::std::string::String>,
49 pub(crate) title: ::std::option::Option<::std::string::String>,
50 pub(crate) source_parameter_name: ::std::option::Option<::std::string::String>,
51 pub(crate) display_options: ::std::option::Option<crate::types::TextFieldControlDisplayOptions>,
52}
53impl ParameterTextFieldControlBuilder {
54 pub fn parameter_control_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.parameter_control_id = ::std::option::Option::Some(input.into());
58 self
59 }
60 pub fn set_parameter_control_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.parameter_control_id = input;
63 self
64 }
65 pub fn get_parameter_control_id(&self) -> &::std::option::Option<::std::string::String> {
67 &self.parameter_control_id
68 }
69 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 self.title = ::std::option::Option::Some(input.into());
73 self
74 }
75 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77 self.title = input;
78 self
79 }
80 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
82 &self.title
83 }
84 pub fn source_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.source_parameter_name = ::std::option::Option::Some(input.into());
88 self
89 }
90 pub fn set_source_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.source_parameter_name = input;
93 self
94 }
95 pub fn get_source_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
97 &self.source_parameter_name
98 }
99 pub fn display_options(mut self, input: crate::types::TextFieldControlDisplayOptions) -> Self {
101 self.display_options = ::std::option::Option::Some(input);
102 self
103 }
104 pub fn set_display_options(mut self, input: ::std::option::Option<crate::types::TextFieldControlDisplayOptions>) -> Self {
106 self.display_options = input;
107 self
108 }
109 pub fn get_display_options(&self) -> &::std::option::Option<crate::types::TextFieldControlDisplayOptions> {
111 &self.display_options
112 }
113 pub fn build(self) -> ::std::result::Result<crate::types::ParameterTextFieldControl, ::aws_smithy_types::error::operation::BuildError> {
119 ::std::result::Result::Ok(crate::types::ParameterTextFieldControl {
120 parameter_control_id: self.parameter_control_id.ok_or_else(|| {
121 ::aws_smithy_types::error::operation::BuildError::missing_field(
122 "parameter_control_id",
123 "parameter_control_id was not specified but it is required when building ParameterTextFieldControl",
124 )
125 })?,
126 title: self.title.ok_or_else(|| {
127 ::aws_smithy_types::error::operation::BuildError::missing_field(
128 "title",
129 "title was not specified but it is required when building ParameterTextFieldControl",
130 )
131 })?,
132 source_parameter_name: self.source_parameter_name.ok_or_else(|| {
133 ::aws_smithy_types::error::operation::BuildError::missing_field(
134 "source_parameter_name",
135 "source_parameter_name was not specified but it is required when building ParameterTextFieldControl",
136 )
137 })?,
138 display_options: self.display_options,
139 })
140 }
141}