aws-sdk-cloudhsm 1.94.0

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>
    pub client_arn: ::std::option::Option<::std::string::String>,
    /// <p>The client version.</p>
    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>
    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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hapg_list.is_none()`.
    pub fn hapg_list(&self) -> &[::std::string::String] {
        self.hapg_list.as_deref().unwrap_or_default()
    }
}
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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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>
    /// This field is required.
    pub fn client_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_arn = ::std::option::Option::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 ARN of the client.</p>
    pub fn get_client_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_arn
    }
    /// <p>The client version.</p>
    /// This field is required.
    pub fn client_version(mut self, input: crate::types::ClientVersion) -> Self {
        self.client_version = ::std::option::Option::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
    }
    /// <p>The client version.</p>
    pub fn get_client_version(&self) -> &::std::option::Option<crate::types::ClientVersion> {
        &self.client_version
    }
    /// 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 ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.hapg_list.unwrap_or_default();
        v.push(input.into());
        self.hapg_list = ::std::option::Option::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
    }
    /// <p>A list of ARNs that identify the high-availability partition groups that are associated with the client.</p>
    pub fn get_hapg_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.hapg_list
    }
    /// Consumes the builder and constructs a [`GetConfigInput`](crate::operation::get_config::GetConfigInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_config::GetConfigInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_config::GetConfigInput {
            client_arn: self.client_arn,
            client_version: self.client_version,
            hapg_list: self.hapg_list,
        })
    }
}