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 UpdateProxyAttributesInput {
    /// The Amazon Resource Name (ARN) of the proxy.
    pub proxy_identifier: ::std::option::Option<::std::string::String>,
    /// The attributes to update. Attributes that you don't specify are unchanged.
    pub attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
}
impl UpdateProxyAttributesInput {
    /// The Amazon Resource Name (ARN) of the proxy.
    pub fn proxy_identifier(&self) -> ::std::option::Option<&str> {
        self.proxy_identifier.as_deref()
    }
    /// The attributes to update. Attributes that you don't specify are unchanged.
    ///
    /// 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::Attribute] {
        self.attributes.as_deref().unwrap_or_default()
    }
}
impl UpdateProxyAttributesInput {
    /// Creates a new builder-style object to manufacture [`UpdateProxyAttributesInput`](crate::operation::update_proxy_attributes::UpdateProxyAttributesInput).
    pub fn builder() -> crate::operation::update_proxy_attributes::builders::UpdateProxyAttributesInputBuilder {
        crate::operation::update_proxy_attributes::builders::UpdateProxyAttributesInputBuilder::default()
    }
}

/// A builder for [`UpdateProxyAttributesInput`](crate::operation::update_proxy_attributes::UpdateProxyAttributesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProxyAttributesInputBuilder {
    pub(crate) proxy_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) attributes: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>,
}
impl UpdateProxyAttributesInputBuilder {
    /// The Amazon Resource Name (ARN) of the proxy.
    /// This field is required.
    pub fn proxy_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.proxy_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the proxy.
    pub fn set_proxy_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.proxy_identifier = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the proxy.
    pub fn get_proxy_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.proxy_identifier
    }
    /// Appends an item to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// The attributes to update. Attributes that you don't specify are unchanged.
    pub fn attributes(mut self, input: crate::types::Attribute) -> Self {
        let mut v = self.attributes.unwrap_or_default();
        v.push(input);
        self.attributes = ::std::option::Option::Some(v);
        self
    }
    /// The attributes to update. Attributes that you don't specify are unchanged.
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>) -> Self {
        self.attributes = input;
        self
    }
    /// The attributes to update. Attributes that you don't specify are unchanged.
    pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attribute>> {
        &self.attributes
    }
    /// Consumes the builder and constructs a [`UpdateProxyAttributesInput`](crate::operation::update_proxy_attributes::UpdateProxyAttributesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_proxy_attributes::UpdateProxyAttributesInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_proxy_attributes::UpdateProxyAttributesInput {
            proxy_identifier: self.proxy_identifier,
            attributes: self.attributes,
        })
    }
}