aws-sdk-elbproxy 1.0.0

AWS SDK for Elastic Load Balancing for Envoy
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 UpdateProxyAttributesOutput {
    /// The attributes for the proxy after the update.
    pub attributes: ::std::vec::Vec<crate::types::AttributeDetails>,
    _request_id: Option<String>,
}
impl UpdateProxyAttributesOutput {
    /// The attributes for the proxy after the update.
    pub fn attributes(&self) -> &[crate::types::AttributeDetails] {
        use std::ops::Deref;
        self.attributes.deref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateProxyAttributesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateProxyAttributesOutput {
    /// Creates a new builder-style object to manufacture [`UpdateProxyAttributesOutput`](crate::operation::update_proxy_attributes::UpdateProxyAttributesOutput).
    pub fn builder() -> crate::operation::update_proxy_attributes::builders::UpdateProxyAttributesOutputBuilder {
        crate::operation::update_proxy_attributes::builders::UpdateProxyAttributesOutputBuilder::default()
    }
}

/// A builder for [`UpdateProxyAttributesOutput`](crate::operation::update_proxy_attributes::UpdateProxyAttributesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProxyAttributesOutputBuilder {
    pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDetails>>,
    _request_id: Option<String>,
}
impl UpdateProxyAttributesOutputBuilder {
    /// Appends an item to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// The attributes for the proxy after the update.
    pub fn attributes(mut self, input: crate::types::AttributeDetails) -> Self {
        let mut v = self.attributes.unwrap_or_default();
        v.push(input);
        self.attributes = ::std::option::Option::Some(v);
        self
    }
    /// The attributes for the proxy after the update.
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDetails>>) -> Self {
        self.attributes = input;
        self
    }
    /// The attributes for the proxy after the update.
    pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeDetails>> {
        &self.attributes
    }
    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 [`UpdateProxyAttributesOutput`](crate::operation::update_proxy_attributes::UpdateProxyAttributesOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`attributes`](crate::operation::update_proxy_attributes::builders::UpdateProxyAttributesOutputBuilder::attributes)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_proxy_attributes::UpdateProxyAttributesOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_proxy_attributes::UpdateProxyAttributesOutput {
            attributes: self.attributes.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "attributes",
                    "attributes was not specified but it is required when building UpdateProxyAttributesOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}