aws-sdk-location 0.26.0

AWS SDK for Amazon Location Service
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 DeleteKeyInput {
    /// <p>The name of the API key to delete.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
}
impl DeleteKeyInput {
    /// <p>The name of the API key to delete.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
}
impl DeleteKeyInput {
    /// Creates a new builder-style object to manufacture [`DeleteKeyInput`](crate::operation::delete_key::DeleteKeyInput).
    pub fn builder() -> crate::operation::delete_key::builders::DeleteKeyInputBuilder {
        crate::operation::delete_key::builders::DeleteKeyInputBuilder::default()
    }
}

/// A builder for [`DeleteKeyInput`](crate::operation::delete_key::DeleteKeyInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DeleteKeyInputBuilder {
    pub(crate) key_name: std::option::Option<std::string::String>,
}
impl DeleteKeyInputBuilder {
    /// <p>The name of the API key to delete.</p>
    pub fn key_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.key_name = Some(input.into());
        self
    }
    /// <p>The name of the API key to delete.</p>
    pub fn set_key_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.key_name = input;
        self
    }
    /// Consumes the builder and constructs a [`DeleteKeyInput`](crate::operation::delete_key::DeleteKeyInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::delete_key::DeleteKeyInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::delete_key::DeleteKeyInput {
            key_name: self.key_name,
        })
    }
}