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 GetProxyAttributesOutput {
    /// The attributes for the proxy.
    pub attributes: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDetails>>,
    _request_id: Option<String>,
}
impl GetProxyAttributesOutput {
    /// The attributes for the proxy.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attributes.is_none()`.
    pub fn attributes(&self) -> &[crate::types::AttributeDetails] {
        self.attributes.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for GetProxyAttributesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetProxyAttributesOutput {
    /// Creates a new builder-style object to manufacture [`GetProxyAttributesOutput`](crate::operation::get_proxy_attributes::GetProxyAttributesOutput).
    pub fn builder() -> crate::operation::get_proxy_attributes::builders::GetProxyAttributesOutputBuilder {
        crate::operation::get_proxy_attributes::builders::GetProxyAttributesOutputBuilder::default()
    }
}

/// A builder for [`GetProxyAttributesOutput`](crate::operation::get_proxy_attributes::GetProxyAttributesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetProxyAttributesOutputBuilder {
    pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDetails>>,
    _request_id: Option<String>,
}
impl GetProxyAttributesOutputBuilder {
    /// Appends an item to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// The attributes for the proxy.
    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.
    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.
    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 [`GetProxyAttributesOutput`](crate::operation::get_proxy_attributes::GetProxyAttributesOutput).
    pub fn build(self) -> crate::operation::get_proxy_attributes::GetProxyAttributesOutput {
        crate::operation::get_proxy_attributes::GetProxyAttributesOutput {
            attributes: self.attributes,
            _request_id: self._request_id,
        }
    }
}