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 DescribeDaemonDeploymentsOutput {
    /// <p>Any failures associated with the call.</p>
    pub failures: ::std::option::Option<::std::vec::Vec<crate::types::Failure>>,
    /// <p>The list of daemon deployments.</p>
    pub daemon_deployments: ::std::option::Option<::std::vec::Vec<crate::types::DaemonDeployment>>,
    _request_id: Option<String>,
}
impl DescribeDaemonDeploymentsOutput {
    /// <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()
    }
    /// <p>The list of daemon deployments.</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_deployments.is_none()`.
    pub fn daemon_deployments(&self) -> &[crate::types::DaemonDeployment] {
        self.daemon_deployments.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for DescribeDaemonDeploymentsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDaemonDeploymentsOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDaemonDeploymentsOutput`](crate::operation::describe_daemon_deployments::DescribeDaemonDeploymentsOutput).
    pub fn builder() -> crate::operation::describe_daemon_deployments::builders::DescribeDaemonDeploymentsOutputBuilder {
        crate::operation::describe_daemon_deployments::builders::DescribeDaemonDeploymentsOutputBuilder::default()
    }
}

/// A builder for [`DescribeDaemonDeploymentsOutput`](crate::operation::describe_daemon_deployments::DescribeDaemonDeploymentsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDaemonDeploymentsOutputBuilder {
    pub(crate) failures: ::std::option::Option<::std::vec::Vec<crate::types::Failure>>,
    pub(crate) daemon_deployments: ::std::option::Option<::std::vec::Vec<crate::types::DaemonDeployment>>,
    _request_id: Option<String>,
}
impl DescribeDaemonDeploymentsOutputBuilder {
    /// 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
    }
    /// Appends an item to `daemon_deployments`.
    ///
    /// To override the contents of this collection use [`set_daemon_deployments`](Self::set_daemon_deployments).
    ///
    /// <p>The list of daemon deployments.</p>
    pub fn daemon_deployments(mut self, input: crate::types::DaemonDeployment) -> Self {
        let mut v = self.daemon_deployments.unwrap_or_default();
        v.push(input);
        self.daemon_deployments = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of daemon deployments.</p>
    pub fn set_daemon_deployments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DaemonDeployment>>) -> Self {
        self.daemon_deployments = input;
        self
    }
    /// <p>The list of daemon deployments.</p>
    pub fn get_daemon_deployments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DaemonDeployment>> {
        &self.daemon_deployments
    }
    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 [`DescribeDaemonDeploymentsOutput`](crate::operation::describe_daemon_deployments::DescribeDaemonDeploymentsOutput).
    pub fn build(self) -> crate::operation::describe_daemon_deployments::DescribeDaemonDeploymentsOutput {
        crate::operation::describe_daemon_deployments::DescribeDaemonDeploymentsOutput {
            failures: self.failures,
            daemon_deployments: self.daemon_deployments,
            _request_id: self._request_id,
        }
    }
}