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 UpdateContainerAgentOutput {
    /// <p>The container instance that the container agent was updated for.</p>
    pub container_instance: ::std::option::Option<crate::types::ContainerInstance>,
    _request_id: Option<String>,
}
impl UpdateContainerAgentOutput {
    /// <p>The container instance that the container agent was updated for.</p>
    pub fn container_instance(&self) -> ::std::option::Option<&crate::types::ContainerInstance> {
        self.container_instance.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateContainerAgentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateContainerAgentOutput {
    /// Creates a new builder-style object to manufacture [`UpdateContainerAgentOutput`](crate::operation::update_container_agent::UpdateContainerAgentOutput).
    pub fn builder() -> crate::operation::update_container_agent::builders::UpdateContainerAgentOutputBuilder {
        crate::operation::update_container_agent::builders::UpdateContainerAgentOutputBuilder::default()
    }
}

/// A builder for [`UpdateContainerAgentOutput`](crate::operation::update_container_agent::UpdateContainerAgentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateContainerAgentOutputBuilder {
    pub(crate) container_instance: ::std::option::Option<crate::types::ContainerInstance>,
    _request_id: Option<String>,
}
impl UpdateContainerAgentOutputBuilder {
    /// <p>The container instance that the container agent was updated for.</p>
    pub fn container_instance(mut self, input: crate::types::ContainerInstance) -> Self {
        self.container_instance = ::std::option::Option::Some(input);
        self
    }
    /// <p>The container instance that the container agent was updated for.</p>
    pub fn set_container_instance(mut self, input: ::std::option::Option<crate::types::ContainerInstance>) -> Self {
        self.container_instance = input;
        self
    }
    /// <p>The container instance that the container agent was updated for.</p>
    pub fn get_container_instance(&self) -> &::std::option::Option<crate::types::ContainerInstance> {
        &self.container_instance
    }
    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 [`UpdateContainerAgentOutput`](crate::operation::update_container_agent::UpdateContainerAgentOutput).
    pub fn build(self) -> crate::operation::update_container_agent::UpdateContainerAgentOutput {
        crate::operation::update_container_agent::UpdateContainerAgentOutput {
            container_instance: self.container_instance,
            _request_id: self._request_id,
        }
    }
}