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>Serverless cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Serverless {
    /// <p>The configuration of the Amazon VPCs for the cluster.</p>
    pub vpc_configs: ::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>>,
    /// <p>Includes all client authentication information.</p>
    pub client_authentication: ::std::option::Option<crate::types::ServerlessClientAuthentication>,
    /// <p>Describes the cluster's connectivity information, such as its network type, which is IPv4 or DUAL.</p>
    pub connectivity_info: ::std::option::Option<crate::types::ServerlessConnectivityInfo>,
}
impl Serverless {
    /// <p>The configuration of the Amazon VPCs for the cluster.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpc_configs.is_none()`.
    pub fn vpc_configs(&self) -> &[crate::types::VpcConfig] {
        self.vpc_configs.as_deref().unwrap_or_default()
    }
    /// <p>Includes all client authentication information.</p>
    pub fn client_authentication(&self) -> ::std::option::Option<&crate::types::ServerlessClientAuthentication> {
        self.client_authentication.as_ref()
    }
    /// <p>Describes the cluster's connectivity information, such as its network type, which is IPv4 or DUAL.</p>
    pub fn connectivity_info(&self) -> ::std::option::Option<&crate::types::ServerlessConnectivityInfo> {
        self.connectivity_info.as_ref()
    }
}
impl Serverless {
    /// Creates a new builder-style object to manufacture [`Serverless`](crate::types::Serverless).
    pub fn builder() -> crate::types::builders::ServerlessBuilder {
        crate::types::builders::ServerlessBuilder::default()
    }
}

/// A builder for [`Serverless`](crate::types::Serverless).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ServerlessBuilder {
    pub(crate) vpc_configs: ::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>>,
    pub(crate) client_authentication: ::std::option::Option<crate::types::ServerlessClientAuthentication>,
    pub(crate) connectivity_info: ::std::option::Option<crate::types::ServerlessConnectivityInfo>,
}
impl ServerlessBuilder {
    /// Appends an item to `vpc_configs`.
    ///
    /// To override the contents of this collection use [`set_vpc_configs`](Self::set_vpc_configs).
    ///
    /// <p>The configuration of the Amazon VPCs for the cluster.</p>
    pub fn vpc_configs(mut self, input: crate::types::VpcConfig) -> Self {
        let mut v = self.vpc_configs.unwrap_or_default();
        v.push(input);
        self.vpc_configs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The configuration of the Amazon VPCs for the cluster.</p>
    pub fn set_vpc_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>>) -> Self {
        self.vpc_configs = input;
        self
    }
    /// <p>The configuration of the Amazon VPCs for the cluster.</p>
    pub fn get_vpc_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VpcConfig>> {
        &self.vpc_configs
    }
    /// <p>Includes all client authentication information.</p>
    pub fn client_authentication(mut self, input: crate::types::ServerlessClientAuthentication) -> Self {
        self.client_authentication = ::std::option::Option::Some(input);
        self
    }
    /// <p>Includes all client authentication information.</p>
    pub fn set_client_authentication(mut self, input: ::std::option::Option<crate::types::ServerlessClientAuthentication>) -> Self {
        self.client_authentication = input;
        self
    }
    /// <p>Includes all client authentication information.</p>
    pub fn get_client_authentication(&self) -> &::std::option::Option<crate::types::ServerlessClientAuthentication> {
        &self.client_authentication
    }
    /// <p>Describes the cluster's connectivity information, such as its network type, which is IPv4 or DUAL.</p>
    pub fn connectivity_info(mut self, input: crate::types::ServerlessConnectivityInfo) -> Self {
        self.connectivity_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes the cluster's connectivity information, such as its network type, which is IPv4 or DUAL.</p>
    pub fn set_connectivity_info(mut self, input: ::std::option::Option<crate::types::ServerlessConnectivityInfo>) -> Self {
        self.connectivity_info = input;
        self
    }
    /// <p>Describes the cluster's connectivity information, such as its network type, which is IPv4 or DUAL.</p>
    pub fn get_connectivity_info(&self) -> &::std::option::Option<crate::types::ServerlessConnectivityInfo> {
        &self.connectivity_info
    }
    /// Consumes the builder and constructs a [`Serverless`](crate::types::Serverless).
    pub fn build(self) -> crate::types::Serverless {
        crate::types::Serverless {
            vpc_configs: self.vpc_configs,
            client_authentication: self.client_authentication,
            connectivity_info: self.connectivity_info,
        }
    }
}