aws-sdk-cloudfront 1.115.0

AWS SDK for Amazon CloudFront
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_anycast_ip_list::_update_anycast_ip_list_input::UpdateAnycastIpListInputBuilder;

pub use crate::operation::update_anycast_ip_list::_update_anycast_ip_list_output::UpdateAnycastIpListOutputBuilder;

impl crate::operation::update_anycast_ip_list::builders::UpdateAnycastIpListInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_anycast_ip_list::UpdateAnycastIpListOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_anycast_ip_list::UpdateAnycastIpListError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_anycast_ip_list();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateAnycastIpList`.
///
/// <p>Updates an Anycast static IP list.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateAnycastIpListFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_anycast_ip_list::builders::UpdateAnycastIpListInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_anycast_ip_list::UpdateAnycastIpListOutput,
        crate::operation::update_anycast_ip_list::UpdateAnycastIpListError,
    > for UpdateAnycastIpListFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_anycast_ip_list::UpdateAnycastIpListOutput,
            crate::operation::update_anycast_ip_list::UpdateAnycastIpListError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateAnycastIpListFluentBuilder {
    /// Creates a new `UpdateAnycastIpListFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateAnycastIpList as a reference.
    pub fn as_input(&self) -> &crate::operation::update_anycast_ip_list::builders::UpdateAnycastIpListInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_anycast_ip_list::UpdateAnycastIpListOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_anycast_ip_list::UpdateAnycastIpListError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_anycast_ip_list::UpdateAnycastIpList::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_anycast_ip_list::UpdateAnycastIpList::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_anycast_ip_list::UpdateAnycastIpListOutput,
        crate::operation::update_anycast_ip_list::UpdateAnycastIpListError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The ID of the Anycast static IP list.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.id(input.into());
        self
    }
    /// <p>The ID of the Anycast static IP list.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_id(input);
        self
    }
    /// <p>The ID of the Anycast static IP list.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_id()
    }
    /// <p>The IP address type for the Anycast static IP list. You can specify one of the following options:</p>
    /// <ul>
    /// <li>
    /// <p><code>ipv4</code> only</p></li>
    /// <li>
    /// <p><code>ipv6</code> only</p></li>
    /// <li>
    /// <p><code>dualstack</code> - Allocate a list of both IPv4 and IPv6 addresses</p></li>
    /// </ul>
    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
        self.inner = self.inner.ip_address_type(input);
        self
    }
    /// <p>The IP address type for the Anycast static IP list. You can specify one of the following options:</p>
    /// <ul>
    /// <li>
    /// <p><code>ipv4</code> only</p></li>
    /// <li>
    /// <p><code>ipv6</code> only</p></li>
    /// <li>
    /// <p><code>dualstack</code> - Allocate a list of both IPv4 and IPv6 addresses</p></li>
    /// </ul>
    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
        self.inner = self.inner.set_ip_address_type(input);
        self
    }
    /// <p>The IP address type for the Anycast static IP list. You can specify one of the following options:</p>
    /// <ul>
    /// <li>
    /// <p><code>ipv4</code> only</p></li>
    /// <li>
    /// <p><code>ipv6</code> only</p></li>
    /// <li>
    /// <p><code>dualstack</code> - Allocate a list of both IPv4 and IPv6 addresses</p></li>
    /// </ul>
    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
        self.inner.get_ip_address_type()
    }
    ///
    /// Appends an item to `IpamCidrConfigs`.
    ///
    /// To override the contents of this collection use [`set_ipam_cidr_configs`](Self::set_ipam_cidr_configs).
    ///
    /// <p>A list of IPAM CIDR configurations that specify the IP address ranges and IPAM pool settings for updating the Anycast static IP list.</p>
    pub fn ipam_cidr_configs(mut self, input: crate::types::IpamCidrConfig) -> Self {
        self.inner = self.inner.ipam_cidr_configs(input);
        self
    }
    /// <p>A list of IPAM CIDR configurations that specify the IP address ranges and IPAM pool settings for updating the Anycast static IP list.</p>
    pub fn set_ipam_cidr_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IpamCidrConfig>>) -> Self {
        self.inner = self.inner.set_ipam_cidr_configs(input);
        self
    }
    /// <p>A list of IPAM CIDR configurations that specify the IP address ranges and IPAM pool settings for updating the Anycast static IP list.</p>
    pub fn get_ipam_cidr_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IpamCidrConfig>> {
        self.inner.get_ipam_cidr_configs()
    }
    /// <p>The current version (ETag value) of the Anycast static IP list that you are updating.</p>
    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.if_match(input.into());
        self
    }
    /// <p>The current version (ETag value) of the Anycast static IP list that you are updating.</p>
    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_if_match(input);
        self
    }
    /// <p>The current version (ETag value) of the Anycast static IP list that you are updating.</p>
    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_if_match()
    }
}