aws-sdk-opsworks 0.27.0

AWS SDK for AWS OpsWorks
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 DescribeLayersInput {
    /// <p>The stack ID.</p>
    #[doc(hidden)]
    pub stack_id: std::option::Option<std::string::String>,
    /// <p>An array of layer IDs that specify the layers to be described. If you omit this parameter, <code>DescribeLayers</code> returns a description of every layer in the specified stack.</p>
    #[doc(hidden)]
    pub layer_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeLayersInput {
    /// <p>The stack ID.</p>
    pub fn stack_id(&self) -> std::option::Option<&str> {
        self.stack_id.as_deref()
    }
    /// <p>An array of layer IDs that specify the layers to be described. If you omit this parameter, <code>DescribeLayers</code> returns a description of every layer in the specified stack.</p>
    pub fn layer_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.layer_ids.as_deref()
    }
}
impl DescribeLayersInput {
    /// Creates a new builder-style object to manufacture [`DescribeLayersInput`](crate::operation::describe_layers::DescribeLayersInput).
    pub fn builder() -> crate::operation::describe_layers::builders::DescribeLayersInputBuilder {
        crate::operation::describe_layers::builders::DescribeLayersInputBuilder::default()
    }
}

/// A builder for [`DescribeLayersInput`](crate::operation::describe_layers::DescribeLayersInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeLayersInputBuilder {
    pub(crate) stack_id: std::option::Option<std::string::String>,
    pub(crate) layer_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeLayersInputBuilder {
    /// <p>The stack ID.</p>
    pub fn stack_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.stack_id = Some(input.into());
        self
    }
    /// <p>The stack ID.</p>
    pub fn set_stack_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.stack_id = input;
        self
    }
    /// Appends an item to `layer_ids`.
    ///
    /// To override the contents of this collection use [`set_layer_ids`](Self::set_layer_ids).
    ///
    /// <p>An array of layer IDs that specify the layers to be described. If you omit this parameter, <code>DescribeLayers</code> returns a description of every layer in the specified stack.</p>
    pub fn layer_ids(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.layer_ids.unwrap_or_default();
        v.push(input.into());
        self.layer_ids = Some(v);
        self
    }
    /// <p>An array of layer IDs that specify the layers to be described. If you omit this parameter, <code>DescribeLayers</code> returns a description of every layer in the specified stack.</p>
    pub fn set_layer_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.layer_ids = input;
        self
    }
    /// Consumes the builder and constructs a [`DescribeLayersInput`](crate::operation::describe_layers::DescribeLayersInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::describe_layers::DescribeLayersInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::describe_layers::DescribeLayersInput {
            stack_id: self.stack_id,
            layer_ids: self.layer_ids,
        })
    }
}