aws-sdk-globalaccelerator 1.102.0

AWS SDK for AWS Global Accelerator
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 RemoveEndpointsInput {
    /// <p>The identifiers of the endpoints that you want to remove.</p>
    pub endpoint_identifiers: ::std::option::Option<::std::vec::Vec<crate::types::EndpointIdentifier>>,
    /// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
    pub endpoint_group_arn: ::std::option::Option<::std::string::String>,
}
impl RemoveEndpointsInput {
    /// <p>The identifiers of the endpoints that you want to remove.</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 `.endpoint_identifiers.is_none()`.
    pub fn endpoint_identifiers(&self) -> &[crate::types::EndpointIdentifier] {
        self.endpoint_identifiers.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
    pub fn endpoint_group_arn(&self) -> ::std::option::Option<&str> {
        self.endpoint_group_arn.as_deref()
    }
}
impl RemoveEndpointsInput {
    /// Creates a new builder-style object to manufacture [`RemoveEndpointsInput`](crate::operation::remove_endpoints::RemoveEndpointsInput).
    pub fn builder() -> crate::operation::remove_endpoints::builders::RemoveEndpointsInputBuilder {
        crate::operation::remove_endpoints::builders::RemoveEndpointsInputBuilder::default()
    }
}

/// A builder for [`RemoveEndpointsInput`](crate::operation::remove_endpoints::RemoveEndpointsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RemoveEndpointsInputBuilder {
    pub(crate) endpoint_identifiers: ::std::option::Option<::std::vec::Vec<crate::types::EndpointIdentifier>>,
    pub(crate) endpoint_group_arn: ::std::option::Option<::std::string::String>,
}
impl RemoveEndpointsInputBuilder {
    /// Appends an item to `endpoint_identifiers`.
    ///
    /// To override the contents of this collection use [`set_endpoint_identifiers`](Self::set_endpoint_identifiers).
    ///
    /// <p>The identifiers of the endpoints that you want to remove.</p>
    pub fn endpoint_identifiers(mut self, input: crate::types::EndpointIdentifier) -> Self {
        let mut v = self.endpoint_identifiers.unwrap_or_default();
        v.push(input);
        self.endpoint_identifiers = ::std::option::Option::Some(v);
        self
    }
    /// <p>The identifiers of the endpoints that you want to remove.</p>
    pub fn set_endpoint_identifiers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EndpointIdentifier>>) -> Self {
        self.endpoint_identifiers = input;
        self
    }
    /// <p>The identifiers of the endpoints that you want to remove.</p>
    pub fn get_endpoint_identifiers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EndpointIdentifier>> {
        &self.endpoint_identifiers
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
    /// This field is required.
    pub fn endpoint_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint_group_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
    pub fn set_endpoint_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint_group_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint group.</p>
    pub fn get_endpoint_group_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint_group_arn
    }
    /// Consumes the builder and constructs a [`RemoveEndpointsInput`](crate::operation::remove_endpoints::RemoveEndpointsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::remove_endpoints::RemoveEndpointsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::remove_endpoints::RemoveEndpointsInput {
            endpoint_identifiers: self.endpoint_identifiers,
            endpoint_group_arn: self.endpoint_group_arn,
        })
    }
}