aws-sdk-kafka 1.126.0

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

/// <p>Details for client authentication using SASL.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Sasl {
    /// <p>Details for SASL/SCRAM client authentication.</p>
    pub scram: ::std::option::Option<crate::types::Scram>,
    /// <p>Indicates whether IAM access control is enabled.</p>
    pub iam: ::std::option::Option<crate::types::Iam>,
}
impl Sasl {
    /// <p>Details for SASL/SCRAM client authentication.</p>
    pub fn scram(&self) -> ::std::option::Option<&crate::types::Scram> {
        self.scram.as_ref()
    }
    /// <p>Indicates whether IAM access control is enabled.</p>
    pub fn iam(&self) -> ::std::option::Option<&crate::types::Iam> {
        self.iam.as_ref()
    }
}
impl Sasl {
    /// Creates a new builder-style object to manufacture [`Sasl`](crate::types::Sasl).
    pub fn builder() -> crate::types::builders::SaslBuilder {
        crate::types::builders::SaslBuilder::default()
    }
}

/// A builder for [`Sasl`](crate::types::Sasl).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SaslBuilder {
    pub(crate) scram: ::std::option::Option<crate::types::Scram>,
    pub(crate) iam: ::std::option::Option<crate::types::Iam>,
}
impl SaslBuilder {
    /// <p>Details for SASL/SCRAM client authentication.</p>
    pub fn scram(mut self, input: crate::types::Scram) -> Self {
        self.scram = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details for SASL/SCRAM client authentication.</p>
    pub fn set_scram(mut self, input: ::std::option::Option<crate::types::Scram>) -> Self {
        self.scram = input;
        self
    }
    /// <p>Details for SASL/SCRAM client authentication.</p>
    pub fn get_scram(&self) -> &::std::option::Option<crate::types::Scram> {
        &self.scram
    }
    /// <p>Indicates whether IAM access control is enabled.</p>
    pub fn iam(mut self, input: crate::types::Iam) -> Self {
        self.iam = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether IAM access control is enabled.</p>
    pub fn set_iam(mut self, input: ::std::option::Option<crate::types::Iam>) -> Self {
        self.iam = input;
        self
    }
    /// <p>Indicates whether IAM access control is enabled.</p>
    pub fn get_iam(&self) -> &::std::option::Option<crate::types::Iam> {
        &self.iam
    }
    /// Consumes the builder and constructs a [`Sasl`](crate::types::Sasl).
    pub fn build(self) -> crate::types::Sasl {
        crate::types::Sasl {
            scram: self.scram,
            iam: self.iam,
        }
    }
}