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