Skip to main content

aws_sdk_securityhub/types/
_aws_cloud_front_distribution_details.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A CloudFront distribution configuration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsCloudFrontDistributionDetails {
7    /// <p>Provides information about the cache configuration for the distribution.</p>
8    pub cache_behaviors: ::std::option::Option<crate::types::AwsCloudFrontDistributionCacheBehaviors>,
9    /// <p>The default cache behavior for the configuration.</p>
10    pub default_cache_behavior: ::std::option::Option<crate::types::AwsCloudFrontDistributionDefaultCacheBehavior>,
11    /// <p>The object that CloudFront sends in response to requests from the origin (for example, index.html) when a viewer requests the root URL for the distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html).</p>
12    pub default_root_object: ::std::option::Option<::std::string::String>,
13    /// <p>The domain name corresponding to the distribution.</p>
14    pub domain_name: ::std::option::Option<::std::string::String>,
15    /// <p>The entity tag is a hash of the object.</p>
16    pub e_tag: ::std::option::Option<::std::string::String>,
17    /// <p>Indicates when that the distribution was last modified.</p>
18    /// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
19    pub last_modified_time: ::std::option::Option<::std::string::String>,
20    /// <p>A complex type that controls whether access logs are written for the distribution.</p>
21    pub logging: ::std::option::Option<crate::types::AwsCloudFrontDistributionLogging>,
22    /// <p>A complex type that contains information about origins for this distribution.</p>
23    pub origins: ::std::option::Option<crate::types::AwsCloudFrontDistributionOrigins>,
24    /// <p>Provides information about the origin groups in the distribution.</p>
25    pub origin_groups: ::std::option::Option<crate::types::AwsCloudFrontDistributionOriginGroups>,
26    /// <p>Provides information about the TLS/SSL configuration that the distribution uses to communicate with viewers.</p>
27    pub viewer_certificate: ::std::option::Option<crate::types::AwsCloudFrontDistributionViewerCertificate>,
28    /// <p>Indicates the current status of the distribution.</p>
29    pub status: ::std::option::Option<::std::string::String>,
30    /// <p>A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution.</p>
31    pub web_acl_id: ::std::option::Option<::std::string::String>,
32}
33impl AwsCloudFrontDistributionDetails {
34    /// <p>Provides information about the cache configuration for the distribution.</p>
35    pub fn cache_behaviors(&self) -> ::std::option::Option<&crate::types::AwsCloudFrontDistributionCacheBehaviors> {
36        self.cache_behaviors.as_ref()
37    }
38    /// <p>The default cache behavior for the configuration.</p>
39    pub fn default_cache_behavior(&self) -> ::std::option::Option<&crate::types::AwsCloudFrontDistributionDefaultCacheBehavior> {
40        self.default_cache_behavior.as_ref()
41    }
42    /// <p>The object that CloudFront sends in response to requests from the origin (for example, index.html) when a viewer requests the root URL for the distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html).</p>
43    pub fn default_root_object(&self) -> ::std::option::Option<&str> {
44        self.default_root_object.as_deref()
45    }
46    /// <p>The domain name corresponding to the distribution.</p>
47    pub fn domain_name(&self) -> ::std::option::Option<&str> {
48        self.domain_name.as_deref()
49    }
50    /// <p>The entity tag is a hash of the object.</p>
51    pub fn e_tag(&self) -> ::std::option::Option<&str> {
52        self.e_tag.as_deref()
53    }
54    /// <p>Indicates when that the distribution was last modified.</p>
55    /// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
56    pub fn last_modified_time(&self) -> ::std::option::Option<&str> {
57        self.last_modified_time.as_deref()
58    }
59    /// <p>A complex type that controls whether access logs are written for the distribution.</p>
60    pub fn logging(&self) -> ::std::option::Option<&crate::types::AwsCloudFrontDistributionLogging> {
61        self.logging.as_ref()
62    }
63    /// <p>A complex type that contains information about origins for this distribution.</p>
64    pub fn origins(&self) -> ::std::option::Option<&crate::types::AwsCloudFrontDistributionOrigins> {
65        self.origins.as_ref()
66    }
67    /// <p>Provides information about the origin groups in the distribution.</p>
68    pub fn origin_groups(&self) -> ::std::option::Option<&crate::types::AwsCloudFrontDistributionOriginGroups> {
69        self.origin_groups.as_ref()
70    }
71    /// <p>Provides information about the TLS/SSL configuration that the distribution uses to communicate with viewers.</p>
72    pub fn viewer_certificate(&self) -> ::std::option::Option<&crate::types::AwsCloudFrontDistributionViewerCertificate> {
73        self.viewer_certificate.as_ref()
74    }
75    /// <p>Indicates the current status of the distribution.</p>
76    pub fn status(&self) -> ::std::option::Option<&str> {
77        self.status.as_deref()
78    }
79    /// <p>A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution.</p>
80    pub fn web_acl_id(&self) -> ::std::option::Option<&str> {
81        self.web_acl_id.as_deref()
82    }
83}
84impl AwsCloudFrontDistributionDetails {
85    /// Creates a new builder-style object to manufacture [`AwsCloudFrontDistributionDetails`](crate::types::AwsCloudFrontDistributionDetails).
86    pub fn builder() -> crate::types::builders::AwsCloudFrontDistributionDetailsBuilder {
87        crate::types::builders::AwsCloudFrontDistributionDetailsBuilder::default()
88    }
89}
90
91/// A builder for [`AwsCloudFrontDistributionDetails`](crate::types::AwsCloudFrontDistributionDetails).
92#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
93#[non_exhaustive]
94pub struct AwsCloudFrontDistributionDetailsBuilder {
95    pub(crate) cache_behaviors: ::std::option::Option<crate::types::AwsCloudFrontDistributionCacheBehaviors>,
96    pub(crate) default_cache_behavior: ::std::option::Option<crate::types::AwsCloudFrontDistributionDefaultCacheBehavior>,
97    pub(crate) default_root_object: ::std::option::Option<::std::string::String>,
98    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
99    pub(crate) e_tag: ::std::option::Option<::std::string::String>,
100    pub(crate) last_modified_time: ::std::option::Option<::std::string::String>,
101    pub(crate) logging: ::std::option::Option<crate::types::AwsCloudFrontDistributionLogging>,
102    pub(crate) origins: ::std::option::Option<crate::types::AwsCloudFrontDistributionOrigins>,
103    pub(crate) origin_groups: ::std::option::Option<crate::types::AwsCloudFrontDistributionOriginGroups>,
104    pub(crate) viewer_certificate: ::std::option::Option<crate::types::AwsCloudFrontDistributionViewerCertificate>,
105    pub(crate) status: ::std::option::Option<::std::string::String>,
106    pub(crate) web_acl_id: ::std::option::Option<::std::string::String>,
107}
108impl AwsCloudFrontDistributionDetailsBuilder {
109    /// <p>Provides information about the cache configuration for the distribution.</p>
110    pub fn cache_behaviors(mut self, input: crate::types::AwsCloudFrontDistributionCacheBehaviors) -> Self {
111        self.cache_behaviors = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>Provides information about the cache configuration for the distribution.</p>
115    pub fn set_cache_behaviors(mut self, input: ::std::option::Option<crate::types::AwsCloudFrontDistributionCacheBehaviors>) -> Self {
116        self.cache_behaviors = input;
117        self
118    }
119    /// <p>Provides information about the cache configuration for the distribution.</p>
120    pub fn get_cache_behaviors(&self) -> &::std::option::Option<crate::types::AwsCloudFrontDistributionCacheBehaviors> {
121        &self.cache_behaviors
122    }
123    /// <p>The default cache behavior for the configuration.</p>
124    pub fn default_cache_behavior(mut self, input: crate::types::AwsCloudFrontDistributionDefaultCacheBehavior) -> Self {
125        self.default_cache_behavior = ::std::option::Option::Some(input);
126        self
127    }
128    /// <p>The default cache behavior for the configuration.</p>
129    pub fn set_default_cache_behavior(mut self, input: ::std::option::Option<crate::types::AwsCloudFrontDistributionDefaultCacheBehavior>) -> Self {
130        self.default_cache_behavior = input;
131        self
132    }
133    /// <p>The default cache behavior for the configuration.</p>
134    pub fn get_default_cache_behavior(&self) -> &::std::option::Option<crate::types::AwsCloudFrontDistributionDefaultCacheBehavior> {
135        &self.default_cache_behavior
136    }
137    /// <p>The object that CloudFront sends in response to requests from the origin (for example, index.html) when a viewer requests the root URL for the distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html).</p>
138    pub fn default_root_object(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.default_root_object = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>The object that CloudFront sends in response to requests from the origin (for example, index.html) when a viewer requests the root URL for the distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html).</p>
143    pub fn set_default_root_object(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.default_root_object = input;
145        self
146    }
147    /// <p>The object that CloudFront sends in response to requests from the origin (for example, index.html) when a viewer requests the root URL for the distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html).</p>
148    pub fn get_default_root_object(&self) -> &::std::option::Option<::std::string::String> {
149        &self.default_root_object
150    }
151    /// <p>The domain name corresponding to the distribution.</p>
152    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.domain_name = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The domain name corresponding to the distribution.</p>
157    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.domain_name = input;
159        self
160    }
161    /// <p>The domain name corresponding to the distribution.</p>
162    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
163        &self.domain_name
164    }
165    /// <p>The entity tag is a hash of the object.</p>
166    pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.e_tag = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>The entity tag is a hash of the object.</p>
171    pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.e_tag = input;
173        self
174    }
175    /// <p>The entity tag is a hash of the object.</p>
176    pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
177        &self.e_tag
178    }
179    /// <p>Indicates when that the distribution was last modified.</p>
180    /// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
181    pub fn last_modified_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.last_modified_time = ::std::option::Option::Some(input.into());
183        self
184    }
185    /// <p>Indicates when that the distribution was last modified.</p>
186    /// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
187    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188        self.last_modified_time = input;
189        self
190    }
191    /// <p>Indicates when that the distribution was last modified.</p>
192    /// <p>For more information about the validation and formatting of timestamp fields in Security Hub CSPM, see <a href="https://docs.aws.amazon.com/securityhub/1.0/APIReference/Welcome.html#timestamps">Timestamps</a>.</p>
193    pub fn get_last_modified_time(&self) -> &::std::option::Option<::std::string::String> {
194        &self.last_modified_time
195    }
196    /// <p>A complex type that controls whether access logs are written for the distribution.</p>
197    pub fn logging(mut self, input: crate::types::AwsCloudFrontDistributionLogging) -> Self {
198        self.logging = ::std::option::Option::Some(input);
199        self
200    }
201    /// <p>A complex type that controls whether access logs are written for the distribution.</p>
202    pub fn set_logging(mut self, input: ::std::option::Option<crate::types::AwsCloudFrontDistributionLogging>) -> Self {
203        self.logging = input;
204        self
205    }
206    /// <p>A complex type that controls whether access logs are written for the distribution.</p>
207    pub fn get_logging(&self) -> &::std::option::Option<crate::types::AwsCloudFrontDistributionLogging> {
208        &self.logging
209    }
210    /// <p>A complex type that contains information about origins for this distribution.</p>
211    pub fn origins(mut self, input: crate::types::AwsCloudFrontDistributionOrigins) -> Self {
212        self.origins = ::std::option::Option::Some(input);
213        self
214    }
215    /// <p>A complex type that contains information about origins for this distribution.</p>
216    pub fn set_origins(mut self, input: ::std::option::Option<crate::types::AwsCloudFrontDistributionOrigins>) -> Self {
217        self.origins = input;
218        self
219    }
220    /// <p>A complex type that contains information about origins for this distribution.</p>
221    pub fn get_origins(&self) -> &::std::option::Option<crate::types::AwsCloudFrontDistributionOrigins> {
222        &self.origins
223    }
224    /// <p>Provides information about the origin groups in the distribution.</p>
225    pub fn origin_groups(mut self, input: crate::types::AwsCloudFrontDistributionOriginGroups) -> Self {
226        self.origin_groups = ::std::option::Option::Some(input);
227        self
228    }
229    /// <p>Provides information about the origin groups in the distribution.</p>
230    pub fn set_origin_groups(mut self, input: ::std::option::Option<crate::types::AwsCloudFrontDistributionOriginGroups>) -> Self {
231        self.origin_groups = input;
232        self
233    }
234    /// <p>Provides information about the origin groups in the distribution.</p>
235    pub fn get_origin_groups(&self) -> &::std::option::Option<crate::types::AwsCloudFrontDistributionOriginGroups> {
236        &self.origin_groups
237    }
238    /// <p>Provides information about the TLS/SSL configuration that the distribution uses to communicate with viewers.</p>
239    pub fn viewer_certificate(mut self, input: crate::types::AwsCloudFrontDistributionViewerCertificate) -> Self {
240        self.viewer_certificate = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>Provides information about the TLS/SSL configuration that the distribution uses to communicate with viewers.</p>
244    pub fn set_viewer_certificate(mut self, input: ::std::option::Option<crate::types::AwsCloudFrontDistributionViewerCertificate>) -> Self {
245        self.viewer_certificate = input;
246        self
247    }
248    /// <p>Provides information about the TLS/SSL configuration that the distribution uses to communicate with viewers.</p>
249    pub fn get_viewer_certificate(&self) -> &::std::option::Option<crate::types::AwsCloudFrontDistributionViewerCertificate> {
250        &self.viewer_certificate
251    }
252    /// <p>Indicates the current status of the distribution.</p>
253    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254        self.status = ::std::option::Option::Some(input.into());
255        self
256    }
257    /// <p>Indicates the current status of the distribution.</p>
258    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259        self.status = input;
260        self
261    }
262    /// <p>Indicates the current status of the distribution.</p>
263    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
264        &self.status
265    }
266    /// <p>A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution.</p>
267    pub fn web_acl_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268        self.web_acl_id = ::std::option::Option::Some(input.into());
269        self
270    }
271    /// <p>A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution.</p>
272    pub fn set_web_acl_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273        self.web_acl_id = input;
274        self
275    }
276    /// <p>A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution.</p>
277    pub fn get_web_acl_id(&self) -> &::std::option::Option<::std::string::String> {
278        &self.web_acl_id
279    }
280    /// Consumes the builder and constructs a [`AwsCloudFrontDistributionDetails`](crate::types::AwsCloudFrontDistributionDetails).
281    pub fn build(self) -> crate::types::AwsCloudFrontDistributionDetails {
282        crate::types::AwsCloudFrontDistributionDetails {
283            cache_behaviors: self.cache_behaviors,
284            default_cache_behavior: self.default_cache_behavior,
285            default_root_object: self.default_root_object,
286            domain_name: self.domain_name,
287            e_tag: self.e_tag,
288            last_modified_time: self.last_modified_time,
289            logging: self.logging,
290            origins: self.origins,
291            origin_groups: self.origin_groups,
292            viewer_certificate: self.viewer_certificate,
293            status: self.status,
294            web_acl_id: self.web_acl_id,
295        }
296    }
297}