1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Configuration of the encryption method that is used for the studio.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StudioEncryptionConfiguration {
    /// <p>The ARN for a KMS key that is used to encrypt studio data.</p>
    #[doc(hidden)]
    pub key_arn: ::std::option::Option<::std::string::String>,
    /// <p>The type of KMS key that is used to encrypt studio data.</p>
    #[doc(hidden)]
    pub key_type: ::std::option::Option<crate::types::StudioEncryptionConfigurationKeyType>,
}
impl StudioEncryptionConfiguration {
    /// <p>The ARN for a KMS key that is used to encrypt studio data.</p>
    pub fn key_arn(&self) -> ::std::option::Option<&str> {
        self.key_arn.as_deref()
    }
    /// <p>The type of KMS key that is used to encrypt studio data.</p>
    pub fn key_type(
        &self,
    ) -> ::std::option::Option<&crate::types::StudioEncryptionConfigurationKeyType> {
        self.key_type.as_ref()
    }
}
impl StudioEncryptionConfiguration {
    /// Creates a new builder-style object to manufacture [`StudioEncryptionConfiguration`](crate::types::StudioEncryptionConfiguration).
    pub fn builder() -> crate::types::builders::StudioEncryptionConfigurationBuilder {
        crate::types::builders::StudioEncryptionConfigurationBuilder::default()
    }
}

/// A builder for [`StudioEncryptionConfiguration`](crate::types::StudioEncryptionConfiguration).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct StudioEncryptionConfigurationBuilder {
    pub(crate) key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) key_type: ::std::option::Option<crate::types::StudioEncryptionConfigurationKeyType>,
}
impl StudioEncryptionConfigurationBuilder {
    /// <p>The ARN for a KMS key that is used to encrypt studio data.</p>
    pub fn key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN for a KMS key that is used to encrypt studio data.</p>
    pub fn set_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_arn = input;
        self
    }
    /// <p>The type of KMS key that is used to encrypt studio data.</p>
    pub fn key_type(mut self, input: crate::types::StudioEncryptionConfigurationKeyType) -> Self {
        self.key_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of KMS key that is used to encrypt studio data.</p>
    pub fn set_key_type(
        mut self,
        input: ::std::option::Option<crate::types::StudioEncryptionConfigurationKeyType>,
    ) -> Self {
        self.key_type = input;
        self
    }
    /// Consumes the builder and constructs a [`StudioEncryptionConfiguration`](crate::types::StudioEncryptionConfiguration).
    pub fn build(self) -> crate::types::StudioEncryptionConfiguration {
        crate::types::StudioEncryptionConfiguration {
            key_arn: self.key_arn,
            key_type: self.key_type,
        }
    }
}