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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DashEncryption {
    /// Time (in seconds) between each encryption key rotation.
    pub key_rotation_interval_seconds: ::std::option::Option<i32>,
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub speke_key_provider: ::std::option::Option<crate::types::SpekeKeyProvider>,
}
impl DashEncryption {
    /// Time (in seconds) between each encryption key rotation.
    pub fn key_rotation_interval_seconds(&self) -> ::std::option::Option<i32> {
        self.key_rotation_interval_seconds
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn speke_key_provider(&self) -> ::std::option::Option<&crate::types::SpekeKeyProvider> {
        self.speke_key_provider.as_ref()
    }
}
impl DashEncryption {
    /// Creates a new builder-style object to manufacture [`DashEncryption`](crate::types::DashEncryption).
    pub fn builder() -> crate::types::builders::DashEncryptionBuilder {
        crate::types::builders::DashEncryptionBuilder::default()
    }
}

/// A builder for [`DashEncryption`](crate::types::DashEncryption).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DashEncryptionBuilder {
    pub(crate) key_rotation_interval_seconds: ::std::option::Option<i32>,
    pub(crate) speke_key_provider: ::std::option::Option<crate::types::SpekeKeyProvider>,
}
impl DashEncryptionBuilder {
    /// Time (in seconds) between each encryption key rotation.
    pub fn key_rotation_interval_seconds(mut self, input: i32) -> Self {
        self.key_rotation_interval_seconds = ::std::option::Option::Some(input);
        self
    }
    /// Time (in seconds) between each encryption key rotation.
    pub fn set_key_rotation_interval_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.key_rotation_interval_seconds = input;
        self
    }
    /// Time (in seconds) between each encryption key rotation.
    pub fn get_key_rotation_interval_seconds(&self) -> &::std::option::Option<i32> {
        &self.key_rotation_interval_seconds
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn speke_key_provider(mut self, input: crate::types::SpekeKeyProvider) -> Self {
        self.speke_key_provider = ::std::option::Option::Some(input);
        self
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn set_speke_key_provider(mut self, input: ::std::option::Option<crate::types::SpekeKeyProvider>) -> Self {
        self.speke_key_provider = input;
        self
    }
    /// A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.
    pub fn get_speke_key_provider(&self) -> &::std::option::Option<crate::types::SpekeKeyProvider> {
        &self.speke_key_provider
    }
    /// Consumes the builder and constructs a [`DashEncryption`](crate::types::DashEncryption).
    pub fn build(self) -> crate::types::DashEncryption {
        crate::types::DashEncryption {
            key_rotation_interval_seconds: self.key_rotation_interval_seconds,
            speke_key_provider: self.speke_key_provider,
        }
    }
}