Skip to main content

aws_sdk_glue/types/
_security_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies a security configuration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SecurityConfiguration {
7    /// <p>The name of the security configuration.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The time at which this security configuration was created.</p>
10    pub created_time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>The encryption configuration associated with this security configuration.</p>
12    pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
13}
14impl SecurityConfiguration {
15    /// <p>The name of the security configuration.</p>
16    pub fn name(&self) -> ::std::option::Option<&str> {
17        self.name.as_deref()
18    }
19    /// <p>The time at which this security configuration was created.</p>
20    pub fn created_time_stamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
21        self.created_time_stamp.as_ref()
22    }
23    /// <p>The encryption configuration associated with this security configuration.</p>
24    pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
25        self.encryption_configuration.as_ref()
26    }
27}
28impl SecurityConfiguration {
29    /// Creates a new builder-style object to manufacture [`SecurityConfiguration`](crate::types::SecurityConfiguration).
30    pub fn builder() -> crate::types::builders::SecurityConfigurationBuilder {
31        crate::types::builders::SecurityConfigurationBuilder::default()
32    }
33}
34
35/// A builder for [`SecurityConfiguration`](crate::types::SecurityConfiguration).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct SecurityConfigurationBuilder {
39    pub(crate) name: ::std::option::Option<::std::string::String>,
40    pub(crate) created_time_stamp: ::std::option::Option<::aws_smithy_types::DateTime>,
41    pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
42}
43impl SecurityConfigurationBuilder {
44    /// <p>The name of the security configuration.</p>
45    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the security configuration.</p>
50    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.name = input;
52        self
53    }
54    /// <p>The name of the security configuration.</p>
55    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.name
57    }
58    /// <p>The time at which this security configuration was created.</p>
59    pub fn created_time_stamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
60        self.created_time_stamp = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The time at which this security configuration was created.</p>
64    pub fn set_created_time_stamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
65        self.created_time_stamp = input;
66        self
67    }
68    /// <p>The time at which this security configuration was created.</p>
69    pub fn get_created_time_stamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
70        &self.created_time_stamp
71    }
72    /// <p>The encryption configuration associated with this security configuration.</p>
73    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
74        self.encryption_configuration = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The encryption configuration associated with this security configuration.</p>
78    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
79        self.encryption_configuration = input;
80        self
81    }
82    /// <p>The encryption configuration associated with this security configuration.</p>
83    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
84        &self.encryption_configuration
85    }
86    /// Consumes the builder and constructs a [`SecurityConfiguration`](crate::types::SecurityConfiguration).
87    pub fn build(self) -> crate::types::SecurityConfiguration {
88        crate::types::SecurityConfiguration {
89            name: self.name,
90            created_time_stamp: self.created_time_stamp,
91            encryption_configuration: self.encryption_configuration,
92        }
93    }
94}