aws-sdk-paymentcryptographydata 1.104.0

AWS SDK for Payment Cryptography Data Plane
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TranslateKeyMaterialInput {
    /// <p>Parameter information of the TR31WrappedKeyBlock containing the transaction key.</p>
    pub incoming_key_material: ::std::option::Option<crate::types::IncomingKeyMaterial>,
    /// <p>Parameter information of the wrapping key used to wrap the transaction key in the outgoing TR31WrappedKeyBlock.</p>
    pub outgoing_key_material: ::std::option::Option<crate::types::OutgoingKeyMaterial>,
    /// <p>The key check value (KCV) algorithm used for calculating the KCV of the derived key.</p>
    pub key_check_value_algorithm: ::std::option::Option<crate::types::KeyCheckValueAlgorithm>,
}
impl TranslateKeyMaterialInput {
    /// <p>Parameter information of the TR31WrappedKeyBlock containing the transaction key.</p>
    pub fn incoming_key_material(&self) -> ::std::option::Option<&crate::types::IncomingKeyMaterial> {
        self.incoming_key_material.as_ref()
    }
    /// <p>Parameter information of the wrapping key used to wrap the transaction key in the outgoing TR31WrappedKeyBlock.</p>
    pub fn outgoing_key_material(&self) -> ::std::option::Option<&crate::types::OutgoingKeyMaterial> {
        self.outgoing_key_material.as_ref()
    }
    /// <p>The key check value (KCV) algorithm used for calculating the KCV of the derived key.</p>
    pub fn key_check_value_algorithm(&self) -> ::std::option::Option<&crate::types::KeyCheckValueAlgorithm> {
        self.key_check_value_algorithm.as_ref()
    }
}
impl TranslateKeyMaterialInput {
    /// Creates a new builder-style object to manufacture [`TranslateKeyMaterialInput`](crate::operation::translate_key_material::TranslateKeyMaterialInput).
    pub fn builder() -> crate::operation::translate_key_material::builders::TranslateKeyMaterialInputBuilder {
        crate::operation::translate_key_material::builders::TranslateKeyMaterialInputBuilder::default()
    }
}

/// A builder for [`TranslateKeyMaterialInput`](crate::operation::translate_key_material::TranslateKeyMaterialInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TranslateKeyMaterialInputBuilder {
    pub(crate) incoming_key_material: ::std::option::Option<crate::types::IncomingKeyMaterial>,
    pub(crate) outgoing_key_material: ::std::option::Option<crate::types::OutgoingKeyMaterial>,
    pub(crate) key_check_value_algorithm: ::std::option::Option<crate::types::KeyCheckValueAlgorithm>,
}
impl TranslateKeyMaterialInputBuilder {
    /// <p>Parameter information of the TR31WrappedKeyBlock containing the transaction key.</p>
    /// This field is required.
    pub fn incoming_key_material(mut self, input: crate::types::IncomingKeyMaterial) -> Self {
        self.incoming_key_material = ::std::option::Option::Some(input);
        self
    }
    /// <p>Parameter information of the TR31WrappedKeyBlock containing the transaction key.</p>
    pub fn set_incoming_key_material(mut self, input: ::std::option::Option<crate::types::IncomingKeyMaterial>) -> Self {
        self.incoming_key_material = input;
        self
    }
    /// <p>Parameter information of the TR31WrappedKeyBlock containing the transaction key.</p>
    pub fn get_incoming_key_material(&self) -> &::std::option::Option<crate::types::IncomingKeyMaterial> {
        &self.incoming_key_material
    }
    /// <p>Parameter information of the wrapping key used to wrap the transaction key in the outgoing TR31WrappedKeyBlock.</p>
    /// This field is required.
    pub fn outgoing_key_material(mut self, input: crate::types::OutgoingKeyMaterial) -> Self {
        self.outgoing_key_material = ::std::option::Option::Some(input);
        self
    }
    /// <p>Parameter information of the wrapping key used to wrap the transaction key in the outgoing TR31WrappedKeyBlock.</p>
    pub fn set_outgoing_key_material(mut self, input: ::std::option::Option<crate::types::OutgoingKeyMaterial>) -> Self {
        self.outgoing_key_material = input;
        self
    }
    /// <p>Parameter information of the wrapping key used to wrap the transaction key in the outgoing TR31WrappedKeyBlock.</p>
    pub fn get_outgoing_key_material(&self) -> &::std::option::Option<crate::types::OutgoingKeyMaterial> {
        &self.outgoing_key_material
    }
    /// <p>The key check value (KCV) algorithm used for calculating the KCV of the derived key.</p>
    pub fn key_check_value_algorithm(mut self, input: crate::types::KeyCheckValueAlgorithm) -> Self {
        self.key_check_value_algorithm = ::std::option::Option::Some(input);
        self
    }
    /// <p>The key check value (KCV) algorithm used for calculating the KCV of the derived key.</p>
    pub fn set_key_check_value_algorithm(mut self, input: ::std::option::Option<crate::types::KeyCheckValueAlgorithm>) -> Self {
        self.key_check_value_algorithm = input;
        self
    }
    /// <p>The key check value (KCV) algorithm used for calculating the KCV of the derived key.</p>
    pub fn get_key_check_value_algorithm(&self) -> &::std::option::Option<crate::types::KeyCheckValueAlgorithm> {
        &self.key_check_value_algorithm
    }
    /// Consumes the builder and constructs a [`TranslateKeyMaterialInput`](crate::operation::translate_key_material::TranslateKeyMaterialInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::translate_key_material::TranslateKeyMaterialInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::translate_key_material::TranslateKeyMaterialInput {
            incoming_key_material: self.incoming_key_material,
            outgoing_key_material: self.outgoing_key_material,
            key_check_value_algorithm: self.key_check_value_algorithm,
        })
    }
}