// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The static value of the resource.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StaticValue {
    /// <p>A list of values. For example, the ARN of the assumed role.</p>
    pub values: ::std::vec::Vec<::std::string::String>,
}
impl StaticValue {
    /// <p>A list of values. For example, the ARN of the assumed role.</p>
    pub fn values(&self) -> &[::std::string::String] {
        use std::ops::Deref;
        self.values.deref()
    }
}
impl StaticValue {
    /// Creates a new builder-style object to manufacture [`StaticValue`](crate::types::StaticValue).
    pub fn builder() -> crate::types::builders::StaticValueBuilder {
        crate::types::builders::StaticValueBuilder::default()
    }
}

/// A builder for [`StaticValue`](crate::types::StaticValue).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StaticValueBuilder {
    pub(crate) values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl StaticValueBuilder {
    /// Appends an item to `values`.
    ///
    /// To override the contents of this collection use [`set_values`](Self::set_values).
    ///
    /// <p>A list of values. For example, the ARN of the assumed role.</p>
    pub fn values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.values.unwrap_or_default();
        v.push(input.into());
        self.values = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of values. For example, the ARN of the assumed role.</p>
    pub fn set_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.values = input;
        self
    }
    /// <p>A list of values. For example, the ARN of the assumed role.</p>
    pub fn get_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.values
    }
    /// Consumes the builder and constructs a [`StaticValue`](crate::types::StaticValue).
    /// This method will fail if any of the following fields are not set:
    /// - [`values`](crate::types::builders::StaticValueBuilder::values)
    pub fn build(self) -> ::std::result::Result<crate::types::StaticValue, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::StaticValue {
            values: self.values.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "values",
                    "values was not specified but it is required when building StaticValue",
                )
            })?,
        })
    }
}
