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 DescribeKeyInput {
    /// <p>The name of the API key resource.</p>
    #[doc(hidden)]
    pub key_name: std::option::Option<std::string::String>,
}
impl DescribeKeyInput {
    /// <p>The name of the API key resource.</p>
    pub fn key_name(&self) -> std::option::Option<&str> {
        self.key_name.as_deref()
    }
}
impl DescribeKeyInput {
    /// Creates a new builder-style object to manufacture [`DescribeKeyInput`](crate::operation::describe_key::DescribeKeyInput).
    pub fn builder() -> crate::operation::describe_key::builders::DescribeKeyInputBuilder {
        crate::operation::describe_key::builders::DescribeKeyInputBuilder::default()
    }
}

/// A builder for [`DescribeKeyInput`](crate::operation::describe_key::DescribeKeyInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeKeyInputBuilder {
    pub(crate) key_name: std::option::Option<std::string::String>,
}
impl DescribeKeyInputBuilder {
    /// <p>The name of the API key resource.</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 resource.</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 [`DescribeKeyInput`](crate::operation::describe_key::DescribeKeyInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::describe_key::DescribeKeyInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::describe_key::DescribeKeyInput {
            key_name: self.key_name,
        })
    }
}