aws-sdk-cloudhsm 0.25.1

AWS SDK for Amazon CloudHSM
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 GetConfigInput {
    /// <p>The ARN of the client.</p>
    #[doc(hidden)]
    pub client_arn: std::option::Option<std::string::String>,
    /// <p>The client version.</p>
    #[doc(hidden)]
    pub client_version: std::option::Option<crate::types::ClientVersion>,
    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
    #[doc(hidden)]
    pub hapg_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl GetConfigInput {
    /// <p>The ARN of the client.</p>
    pub fn client_arn(&self) -> std::option::Option<&str> {
        self.client_arn.as_deref()
    }
    /// <p>The client version.</p>
    pub fn client_version(&self) -> std::option::Option<&crate::types::ClientVersion> {
        self.client_version.as_ref()
    }
    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
    pub fn hapg_list(&self) -> std::option::Option<&[std::string::String]> {
        self.hapg_list.as_deref()
    }
}
impl GetConfigInput {
    /// Creates a new builder-style object to manufacture [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
    pub fn builder() -> crate::operation::get_config::builders::GetConfigInputBuilder {
        crate::operation::get_config::builders::GetConfigInputBuilder::default()
    }
}

/// A builder for [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetConfigInputBuilder {
    pub(crate) client_arn: std::option::Option<std::string::String>,
    pub(crate) client_version: std::option::Option<crate::types::ClientVersion>,
    pub(crate) hapg_list: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl GetConfigInputBuilder {
    /// <p>The ARN of the client.</p>
    pub fn client_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.client_arn = Some(input.into());
        self
    }
    /// <p>The ARN of the client.</p>
    pub fn set_client_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.client_arn = input;
        self
    }
    /// <p>The client version.</p>
    pub fn client_version(mut self, input: crate::types::ClientVersion) -> Self {
        self.client_version = Some(input);
        self
    }
    /// <p>The client version.</p>
    pub fn set_client_version(
        mut self,
        input: std::option::Option<crate::types::ClientVersion>,
    ) -> Self {
        self.client_version = input;
        self
    }
    /// Appends an item to `hapg_list`.
    ///
    /// To override the contents of this collection use [`set_hapg_list`](Self::set_hapg_list).
    ///
    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
    pub fn hapg_list(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.hapg_list.unwrap_or_default();
        v.push(input.into());
        self.hapg_list = Some(v);
        self
    }
    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
    pub fn set_hapg_list(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.hapg_list = input;
        self
    }
    /// Consumes the builder and constructs a [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::get_config::GetConfigInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::get_config::GetConfigInput {
            client_arn: self.client_arn,
            client_version: self.client_version,
            hapg_list: self.hapg_list,
        })
    }
}