aws-sdk-ecs 1.128.0

AWS SDK for Amazon EC2 Container Service
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 DescribeDaemonRevisionsOutput {
    /// <p>The list of daemon revisions.</p>
    pub daemon_revisions: ::std::option::Option<::std::vec::Vec<crate::types::DaemonRevision>>,
    /// <p>Any failures associated with the call.</p>
    pub failures: ::std::option::Option<::std::vec::Vec<crate::types::Failure>>,
    _request_id: Option<String>,
}
impl DescribeDaemonRevisionsOutput {
    /// <p>The list of daemon revisions.</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 `.daemon_revisions.is_none()`.
    pub fn daemon_revisions(&self) -> &[crate::types::DaemonRevision] {
        self.daemon_revisions.as_deref().unwrap_or_default()
    }
    /// <p>Any failures associated with the call.</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 `.failures.is_none()`.
    pub fn failures(&self) -> &[crate::types::Failure] {
        self.failures.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for DescribeDaemonRevisionsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDaemonRevisionsOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDaemonRevisionsOutput`](crate::operation::describe_daemon_revisions::DescribeDaemonRevisionsOutput).
    pub fn builder() -> crate::operation::describe_daemon_revisions::builders::DescribeDaemonRevisionsOutputBuilder {
        crate::operation::describe_daemon_revisions::builders::DescribeDaemonRevisionsOutputBuilder::default()
    }
}

/// A builder for [`DescribeDaemonRevisionsOutput`](crate::operation::describe_daemon_revisions::DescribeDaemonRevisionsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDaemonRevisionsOutputBuilder {
    pub(crate) daemon_revisions: ::std::option::Option<::std::vec::Vec<crate::types::DaemonRevision>>,
    pub(crate) failures: ::std::option::Option<::std::vec::Vec<crate::types::Failure>>,
    _request_id: Option<String>,
}
impl DescribeDaemonRevisionsOutputBuilder {
    /// Appends an item to `daemon_revisions`.
    ///
    /// To override the contents of this collection use [`set_daemon_revisions`](Self::set_daemon_revisions).
    ///
    /// <p>The list of daemon revisions.</p>
    pub fn daemon_revisions(mut self, input: crate::types::DaemonRevision) -> Self {
        let mut v = self.daemon_revisions.unwrap_or_default();
        v.push(input);
        self.daemon_revisions = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of daemon revisions.</p>
    pub fn set_daemon_revisions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DaemonRevision>>) -> Self {
        self.daemon_revisions = input;
        self
    }
    /// <p>The list of daemon revisions.</p>
    pub fn get_daemon_revisions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DaemonRevision>> {
        &self.daemon_revisions
    }
    /// Appends an item to `failures`.
    ///
    /// To override the contents of this collection use [`set_failures`](Self::set_failures).
    ///
    /// <p>Any failures associated with the call.</p>
    pub fn failures(mut self, input: crate::types::Failure) -> Self {
        let mut v = self.failures.unwrap_or_default();
        v.push(input);
        self.failures = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any failures associated with the call.</p>
    pub fn set_failures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Failure>>) -> Self {
        self.failures = input;
        self
    }
    /// <p>Any failures associated with the call.</p>
    pub fn get_failures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Failure>> {
        &self.failures
    }
    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
    }
    /// Consumes the builder and constructs a [`DescribeDaemonRevisionsOutput`](crate::operation::describe_daemon_revisions::DescribeDaemonRevisionsOutput).
    pub fn build(self) -> crate::operation::describe_daemon_revisions::DescribeDaemonRevisionsOutput {
        crate::operation::describe_daemon_revisions::DescribeDaemonRevisionsOutput {
            daemon_revisions: self.daemon_revisions,
            failures: self.failures,
            _request_id: self._request_id,
        }
    }
}