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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Information about the encryption of the flow.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Encryption {
/// The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
#[doc(hidden)]
pub algorithm: std::option::Option<crate::types::Algorithm>,
/// A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
#[doc(hidden)]
pub constant_initialization_vector: std::option::Option<std::string::String>,
/// The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
#[doc(hidden)]
pub device_id: std::option::Option<std::string::String>,
/// The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
#[doc(hidden)]
pub key_type: std::option::Option<crate::types::KeyType>,
/// The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
#[doc(hidden)]
pub region: std::option::Option<std::string::String>,
/// An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
/// The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
/// The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
#[doc(hidden)]
pub secret_arn: std::option::Option<std::string::String>,
/// The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
#[doc(hidden)]
pub url: std::option::Option<std::string::String>,
}
impl Encryption {
/// The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
pub fn algorithm(&self) -> std::option::Option<&crate::types::Algorithm> {
self.algorithm.as_ref()
}
/// A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
pub fn constant_initialization_vector(&self) -> std::option::Option<&str> {
self.constant_initialization_vector.as_deref()
}
/// The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn device_id(&self) -> std::option::Option<&str> {
self.device_id.as_deref()
}
/// The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
pub fn key_type(&self) -> std::option::Option<&crate::types::KeyType> {
self.key_type.as_ref()
}
/// The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn region(&self) -> std::option::Option<&str> {
self.region.as_deref()
}
/// An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
/// The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
/// The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
pub fn secret_arn(&self) -> std::option::Option<&str> {
self.secret_arn.as_deref()
}
/// The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
impl Encryption {
/// Creates a new builder-style object to manufacture [`Encryption`](crate::types::Encryption).
pub fn builder() -> crate::types::builders::EncryptionBuilder {
crate::types::builders::EncryptionBuilder::default()
}
}
/// A builder for [`Encryption`](crate::types::Encryption).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct EncryptionBuilder {
pub(crate) algorithm: std::option::Option<crate::types::Algorithm>,
pub(crate) constant_initialization_vector: std::option::Option<std::string::String>,
pub(crate) device_id: std::option::Option<std::string::String>,
pub(crate) key_type: std::option::Option<crate::types::KeyType>,
pub(crate) region: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) secret_arn: std::option::Option<std::string::String>,
pub(crate) url: std::option::Option<std::string::String>,
}
impl EncryptionBuilder {
/// The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
pub fn algorithm(mut self, input: crate::types::Algorithm) -> Self {
self.algorithm = Some(input);
self
}
/// The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).
pub fn set_algorithm(mut self, input: std::option::Option<crate::types::Algorithm>) -> Self {
self.algorithm = input;
self
}
/// A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
pub fn constant_initialization_vector(mut self, input: impl Into<std::string::String>) -> Self {
self.constant_initialization_vector = Some(input.into());
self
}
/// A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.
pub fn set_constant_initialization_vector(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.constant_initialization_vector = input;
self
}
/// The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
self.device_id = Some(input.into());
self
}
/// The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.device_id = input;
self
}
/// The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
pub fn key_type(mut self, input: crate::types::KeyType) -> Self {
self.key_type = Some(input);
self
}
/// The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).
pub fn set_key_type(mut self, input: std::option::Option<crate::types::KeyType>) -> Self {
self.key_type = input;
self
}
/// The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
self.region = Some(input.into());
self
}
/// The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region = input;
self
}
/// An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
/// An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
/// The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
/// The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
pub fn secret_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.secret_arn = Some(input.into());
self
}
/// The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.
pub fn set_secret_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.secret_arn = input;
self
}
/// The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
/// The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
/// Consumes the builder and constructs a [`Encryption`](crate::types::Encryption).
pub fn build(self) -> crate::types::Encryption {
crate::types::Encryption {
algorithm: self.algorithm,
constant_initialization_vector: self.constant_initialization_vector,
device_id: self.device_id,
key_type: self.key_type,
region: self.region,
resource_id: self.resource_id,
role_arn: self.role_arn,
secret_arn: self.secret_arn,
url: self.url,
}
}
}