#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeCommandsOutput {
#[doc(hidden)]
pub commands: std::option::Option<std::vec::Vec<crate::types::Command>>,
_request_id: Option<String>,
}
impl DescribeCommandsOutput {
pub fn commands(&self) -> std::option::Option<&[crate::types::Command]> {
self.commands.as_deref()
}
}
impl aws_http::request_id::RequestId for DescribeCommandsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeCommandsOutput {
pub fn builder() -> crate::operation::describe_commands::builders::DescribeCommandsOutputBuilder
{
crate::operation::describe_commands::builders::DescribeCommandsOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeCommandsOutputBuilder {
pub(crate) commands: std::option::Option<std::vec::Vec<crate::types::Command>>,
_request_id: Option<String>,
}
impl DescribeCommandsOutputBuilder {
pub fn commands(mut self, input: crate::types::Command) -> Self {
let mut v = self.commands.unwrap_or_default();
v.push(input);
self.commands = Some(v);
self
}
pub fn set_commands(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Command>>,
) -> Self {
self.commands = input;
self
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::describe_commands::DescribeCommandsOutput {
crate::operation::describe_commands::DescribeCommandsOutput {
commands: self.commands,
_request_id: self._request_id,
}
}
}