aws-sdk-opsworks 0.26.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 DescribeCommandsInput {
    /// <p>The deployment ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified deployment.</p>
    #[doc(hidden)]
    pub deployment_id: std::option::Option<std::string::String>,
    /// <p>The instance ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified instance.</p>
    #[doc(hidden)]
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>An array of command IDs. If you include this parameter, <code>DescribeCommands</code> returns a description of the specified commands. Otherwise, it returns a description of every command.</p>
    #[doc(hidden)]
    pub command_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeCommandsInput {
    /// <p>The deployment ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified deployment.</p>
    pub fn deployment_id(&self) -> std::option::Option<&str> {
        self.deployment_id.as_deref()
    }
    /// <p>The instance ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>An array of command IDs. If you include this parameter, <code>DescribeCommands</code> returns a description of the specified commands. Otherwise, it returns a description of every command.</p>
    pub fn command_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.command_ids.as_deref()
    }
}
impl DescribeCommandsInput {
    /// Creates a new builder-style object to manufacture [`DescribeCommandsInput`](crate::operation::describe_commands::DescribeCommandsInput).
    pub fn builder() -> crate::operation::describe_commands::builders::DescribeCommandsInputBuilder
    {
        crate::operation::describe_commands::builders::DescribeCommandsInputBuilder::default()
    }
}

/// A builder for [`DescribeCommandsInput`](crate::operation::describe_commands::DescribeCommandsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeCommandsInputBuilder {
    pub(crate) deployment_id: std::option::Option<std::string::String>,
    pub(crate) instance_id: std::option::Option<std::string::String>,
    pub(crate) command_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl DescribeCommandsInputBuilder {
    /// <p>The deployment ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified deployment.</p>
    pub fn deployment_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.deployment_id = Some(input.into());
        self
    }
    /// <p>The deployment ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified deployment.</p>
    pub fn set_deployment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.deployment_id = input;
        self
    }
    /// <p>The instance ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified instance.</p>
    pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.instance_id = Some(input.into());
        self
    }
    /// <p>The instance ID. If you include this parameter, <code>DescribeCommands</code> returns a description of the commands associated with the specified instance.</p>
    pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// Appends an item to `command_ids`.
    ///
    /// To override the contents of this collection use [`set_command_ids`](Self::set_command_ids).
    ///
    /// <p>An array of command IDs. If you include this parameter, <code>DescribeCommands</code> returns a description of the specified commands. Otherwise, it returns a description of every command.</p>
    pub fn command_ids(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.command_ids.unwrap_or_default();
        v.push(input.into());
        self.command_ids = Some(v);
        self
    }
    /// <p>An array of command IDs. If you include this parameter, <code>DescribeCommands</code> returns a description of the specified commands. Otherwise, it returns a description of every command.</p>
    pub fn set_command_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.command_ids = input;
        self
    }
    /// Consumes the builder and constructs a [`DescribeCommandsInput`](crate::operation::describe_commands::DescribeCommandsInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::describe_commands::DescribeCommandsInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::describe_commands::DescribeCommandsInput {
            deployment_id: self.deployment_id,
            instance_id: self.instance_id,
            command_ids: self.command_ids,
        })
    }
}