aws_sdk_cognitoidentityprovider/types/
_string_attribute_constraints_type.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StringAttributeConstraintsType {
7 pub min_length: ::std::option::Option<::std::string::String>,
9 pub max_length: ::std::option::Option<::std::string::String>,
11}
12impl StringAttributeConstraintsType {
13 pub fn min_length(&self) -> ::std::option::Option<&str> {
15 self.min_length.as_deref()
16 }
17 pub fn max_length(&self) -> ::std::option::Option<&str> {
19 self.max_length.as_deref()
20 }
21}
22impl StringAttributeConstraintsType {
23 pub fn builder() -> crate::types::builders::StringAttributeConstraintsTypeBuilder {
25 crate::types::builders::StringAttributeConstraintsTypeBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct StringAttributeConstraintsTypeBuilder {
33 pub(crate) min_length: ::std::option::Option<::std::string::String>,
34 pub(crate) max_length: ::std::option::Option<::std::string::String>,
35}
36impl StringAttributeConstraintsTypeBuilder {
37 pub fn min_length(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.min_length = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_min_length(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.min_length = input;
45 self
46 }
47 pub fn get_min_length(&self) -> &::std::option::Option<::std::string::String> {
49 &self.min_length
50 }
51 pub fn max_length(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.max_length = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_max_length(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.max_length = input;
59 self
60 }
61 pub fn get_max_length(&self) -> &::std::option::Option<::std::string::String> {
63 &self.max_length
64 }
65 pub fn build(self) -> crate::types::StringAttributeConstraintsType {
67 crate::types::StringAttributeConstraintsType {
68 min_length: self.min_length,
69 max_length: self.max_length,
70 }
71 }
72}