aws_sdk_nimble/types/
_studio_encryption_configuration.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StudioEncryptionConfiguration {
7 pub key_arn: ::std::option::Option<::std::string::String>,
9 pub key_type: crate::types::StudioEncryptionConfigurationKeyType,
11}
12impl StudioEncryptionConfiguration {
13 pub fn key_arn(&self) -> ::std::option::Option<&str> {
15 self.key_arn.as_deref()
16 }
17 pub fn key_type(&self) -> &crate::types::StudioEncryptionConfigurationKeyType {
19 &self.key_type
20 }
21}
22impl StudioEncryptionConfiguration {
23 pub fn builder() -> crate::types::builders::StudioEncryptionConfigurationBuilder {
25 crate::types::builders::StudioEncryptionConfigurationBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct StudioEncryptionConfigurationBuilder {
33 pub(crate) key_arn: ::std::option::Option<::std::string::String>,
34 pub(crate) key_type: ::std::option::Option<crate::types::StudioEncryptionConfigurationKeyType>,
35}
36impl StudioEncryptionConfigurationBuilder {
37 pub fn key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.key_arn = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.key_arn = input;
45 self
46 }
47 pub fn get_key_arn(&self) -> &::std::option::Option<::std::string::String> {
49 &self.key_arn
50 }
51 pub fn key_type(mut self, input: crate::types::StudioEncryptionConfigurationKeyType) -> Self {
54 self.key_type = ::std::option::Option::Some(input);
55 self
56 }
57 pub fn set_key_type(mut self, input: ::std::option::Option<crate::types::StudioEncryptionConfigurationKeyType>) -> Self {
59 self.key_type = input;
60 self
61 }
62 pub fn get_key_type(&self) -> &::std::option::Option<crate::types::StudioEncryptionConfigurationKeyType> {
64 &self.key_type
65 }
66 pub fn build(self) -> ::std::result::Result<crate::types::StudioEncryptionConfiguration, ::aws_smithy_types::error::operation::BuildError> {
70 ::std::result::Result::Ok(crate::types::StudioEncryptionConfiguration {
71 key_arn: self.key_arn,
72 key_type: self.key_type.ok_or_else(|| {
73 ::aws_smithy_types::error::operation::BuildError::missing_field(
74 "key_type",
75 "key_type was not specified but it is required when building StudioEncryptionConfiguration",
76 )
77 })?,
78 })
79 }
80}