aws_sdk_securityhub/types/
_aws_s3_bucket_website_configuration_routing_rule_redirect.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsS3BucketWebsiteConfigurationRoutingRuleRedirect {
7 pub hostname: ::std::option::Option<::std::string::String>,
9 pub http_redirect_code: ::std::option::Option<::std::string::String>,
11 pub protocol: ::std::option::Option<::std::string::String>,
13 pub replace_key_prefix_with: ::std::option::Option<::std::string::String>,
16 pub replace_key_with: ::std::option::Option<::std::string::String>,
19}
20impl AwsS3BucketWebsiteConfigurationRoutingRuleRedirect {
21 pub fn hostname(&self) -> ::std::option::Option<&str> {
23 self.hostname.as_deref()
24 }
25 pub fn http_redirect_code(&self) -> ::std::option::Option<&str> {
27 self.http_redirect_code.as_deref()
28 }
29 pub fn protocol(&self) -> ::std::option::Option<&str> {
31 self.protocol.as_deref()
32 }
33 pub fn replace_key_prefix_with(&self) -> ::std::option::Option<&str> {
36 self.replace_key_prefix_with.as_deref()
37 }
38 pub fn replace_key_with(&self) -> ::std::option::Option<&str> {
41 self.replace_key_with.as_deref()
42 }
43}
44impl AwsS3BucketWebsiteConfigurationRoutingRuleRedirect {
45 pub fn builder() -> crate::types::builders::AwsS3BucketWebsiteConfigurationRoutingRuleRedirectBuilder {
47 crate::types::builders::AwsS3BucketWebsiteConfigurationRoutingRuleRedirectBuilder::default()
48 }
49}
50
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
53#[non_exhaustive]
54pub struct AwsS3BucketWebsiteConfigurationRoutingRuleRedirectBuilder {
55 pub(crate) hostname: ::std::option::Option<::std::string::String>,
56 pub(crate) http_redirect_code: ::std::option::Option<::std::string::String>,
57 pub(crate) protocol: ::std::option::Option<::std::string::String>,
58 pub(crate) replace_key_prefix_with: ::std::option::Option<::std::string::String>,
59 pub(crate) replace_key_with: ::std::option::Option<::std::string::String>,
60}
61impl AwsS3BucketWebsiteConfigurationRoutingRuleRedirectBuilder {
62 pub fn hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.hostname = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.hostname = input;
70 self
71 }
72 pub fn get_hostname(&self) -> &::std::option::Option<::std::string::String> {
74 &self.hostname
75 }
76 pub fn http_redirect_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.http_redirect_code = ::std::option::Option::Some(input.into());
79 self
80 }
81 pub fn set_http_redirect_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.http_redirect_code = input;
84 self
85 }
86 pub fn get_http_redirect_code(&self) -> &::std::option::Option<::std::string::String> {
88 &self.http_redirect_code
89 }
90 pub fn protocol(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.protocol = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_protocol(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.protocol = input;
98 self
99 }
100 pub fn get_protocol(&self) -> &::std::option::Option<::std::string::String> {
102 &self.protocol
103 }
104 pub fn replace_key_prefix_with(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.replace_key_prefix_with = ::std::option::Option::Some(input.into());
108 self
109 }
110 pub fn set_replace_key_prefix_with(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.replace_key_prefix_with = input;
114 self
115 }
116 pub fn get_replace_key_prefix_with(&self) -> &::std::option::Option<::std::string::String> {
119 &self.replace_key_prefix_with
120 }
121 pub fn replace_key_with(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.replace_key_with = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_replace_key_with(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130 self.replace_key_with = input;
131 self
132 }
133 pub fn get_replace_key_with(&self) -> &::std::option::Option<::std::string::String> {
136 &self.replace_key_with
137 }
138 pub fn build(self) -> crate::types::AwsS3BucketWebsiteConfigurationRoutingRuleRedirect {
140 crate::types::AwsS3BucketWebsiteConfigurationRoutingRuleRedirect {
141 hostname: self.hostname,
142 http_redirect_code: self.http_redirect_code,
143 protocol: self.protocol,
144 replace_key_prefix_with: self.replace_key_prefix_with,
145 replace_key_with: self.replace_key_with,
146 }
147 }
148}