aws-sdk-lambda 1.121.0

AWS SDK for AWS Lambda
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 UpdateCapacityProviderInput {
    /// <p>The name of the capacity provider to update.</p>
    pub capacity_provider_name: ::std::option::Option<::std::string::String>,
    /// <p>The updated scaling configuration for the capacity provider.</p>
    pub capacity_provider_scaling_config: ::std::option::Option<crate::types::CapacityProviderScalingConfig>,
}
impl UpdateCapacityProviderInput {
    /// <p>The name of the capacity provider to update.</p>
    pub fn capacity_provider_name(&self) -> ::std::option::Option<&str> {
        self.capacity_provider_name.as_deref()
    }
    /// <p>The updated scaling configuration for the capacity provider.</p>
    pub fn capacity_provider_scaling_config(&self) -> ::std::option::Option<&crate::types::CapacityProviderScalingConfig> {
        self.capacity_provider_scaling_config.as_ref()
    }
}
impl UpdateCapacityProviderInput {
    /// Creates a new builder-style object to manufacture [`UpdateCapacityProviderInput`](crate::operation::update_capacity_provider::UpdateCapacityProviderInput).
    pub fn builder() -> crate::operation::update_capacity_provider::builders::UpdateCapacityProviderInputBuilder {
        crate::operation::update_capacity_provider::builders::UpdateCapacityProviderInputBuilder::default()
    }
}

/// A builder for [`UpdateCapacityProviderInput`](crate::operation::update_capacity_provider::UpdateCapacityProviderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCapacityProviderInputBuilder {
    pub(crate) capacity_provider_name: ::std::option::Option<::std::string::String>,
    pub(crate) capacity_provider_scaling_config: ::std::option::Option<crate::types::CapacityProviderScalingConfig>,
}
impl UpdateCapacityProviderInputBuilder {
    /// <p>The name of the capacity provider to update.</p>
    /// This field is required.
    pub fn capacity_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capacity_provider_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the capacity provider to update.</p>
    pub fn set_capacity_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capacity_provider_name = input;
        self
    }
    /// <p>The name of the capacity provider to update.</p>
    pub fn get_capacity_provider_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.capacity_provider_name
    }
    /// <p>The updated scaling configuration for the capacity provider.</p>
    pub fn capacity_provider_scaling_config(mut self, input: crate::types::CapacityProviderScalingConfig) -> Self {
        self.capacity_provider_scaling_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated scaling configuration for the capacity provider.</p>
    pub fn set_capacity_provider_scaling_config(mut self, input: ::std::option::Option<crate::types::CapacityProviderScalingConfig>) -> Self {
        self.capacity_provider_scaling_config = input;
        self
    }
    /// <p>The updated scaling configuration for the capacity provider.</p>
    pub fn get_capacity_provider_scaling_config(&self) -> &::std::option::Option<crate::types::CapacityProviderScalingConfig> {
        &self.capacity_provider_scaling_config
    }
    /// Consumes the builder and constructs a [`UpdateCapacityProviderInput`](crate::operation::update_capacity_provider::UpdateCapacityProviderInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_capacity_provider::UpdateCapacityProviderInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_capacity_provider::UpdateCapacityProviderInput {
            capacity_provider_name: self.capacity_provider_name,
            capacity_provider_scaling_config: self.capacity_provider_scaling_config,
        })
    }
}