aws-sdk-mediaconnect 1.82.0

AWS SDK for AWS MediaConnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about the encryption of the flow.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Encryption {
    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
    pub algorithm: ::std::option::Option<crate::types::Algorithm>,
    /// <p>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.</p>
    pub constant_initialization_vector: ::std::option::Option<::std::string::String>,
    /// <p>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.</p>
    pub device_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
    pub key_type: ::std::option::Option<crate::types::KeyType>,
    /// <p>The Amazon Web Services 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.</p>
    pub region: ::std::option::Option<::std::string::String>,
    /// <p>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.</p>
    pub resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
    pub secret_arn: ::std::option::Option<::std::string::String>,
    /// <p>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.</p>
    pub url: ::std::option::Option<::std::string::String>,
}
impl Encryption {
    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
    pub fn algorithm(&self) -> ::std::option::Option<&crate::types::Algorithm> {
        self.algorithm.as_ref()
    }
    /// <p>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.</p>
    pub fn constant_initialization_vector(&self) -> ::std::option::Option<&str> {
        self.constant_initialization_vector.as_deref()
    }
    /// <p>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.</p>
    pub fn device_id(&self) -> ::std::option::Option<&str> {
        self.device_id.as_deref()
    }
    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
    pub fn key_type(&self) -> ::std::option::Option<&crate::types::KeyType> {
        self.key_type.as_ref()
    }
    /// <p>The Amazon Web Services 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.</p>
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>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.</p>
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
    pub fn secret_arn(&self) -> ::std::option::Option<&str> {
        self.secret_arn.as_deref()
    }
    /// <p>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.</p>
    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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 {
    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
    pub fn algorithm(mut self, input: crate::types::Algorithm) -> Self {
        self.algorithm = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
    pub fn set_algorithm(mut self, input: ::std::option::Option<crate::types::Algorithm>) -> Self {
        self.algorithm = input;
        self
    }
    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
    pub fn get_algorithm(&self) -> &::std::option::Option<crate::types::Algorithm> {
        &self.algorithm
    }
    /// <p>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.</p>
    pub fn constant_initialization_vector(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.constant_initialization_vector = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>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.</p>
    pub fn set_constant_initialization_vector(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.constant_initialization_vector = input;
        self
    }
    /// <p>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.</p>
    pub fn get_constant_initialization_vector(&self) -> &::std::option::Option<::std::string::String> {
        &self.constant_initialization_vector
    }
    /// <p>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.</p>
    pub fn device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>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.</p>
    pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_id = input;
        self
    }
    /// <p>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.</p>
    pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_id
    }
    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
    pub fn key_type(mut self, input: crate::types::KeyType) -> Self {
        self.key_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
    pub fn set_key_type(mut self, input: ::std::option::Option<crate::types::KeyType>) -> Self {
        self.key_type = input;
        self
    }
    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
    pub fn get_key_type(&self) -> &::std::option::Option<crate::types::KeyType> {
        &self.key_type
    }
    /// <p>The Amazon Web Services 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.</p>
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services 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.</p>
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// <p>The Amazon Web Services 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.</p>
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// <p>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.</p>
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>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.</p>
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_id = input;
        self
    }
    /// <p>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.</p>
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_id
    }
    /// <p>The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).</p>
    /// This field is required.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
    pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.secret_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
    pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.secret_arn = input;
        self
    }
    /// <p>The ARN of the secret that you created in Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
    pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.secret_arn
    }
    /// <p>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.</p>
    pub fn url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.url = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>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.</p>
    pub fn set_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.url = input;
        self
    }
    /// <p>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.</p>
    pub fn get_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.url
    }
    /// 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,
        }
    }
}