1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The request to get a distribution's information.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetDistributionInput {
    /// <p>The distribution's ID. If the ID is empty, an empty distribution configuration is returned.</p>
    pub id: ::std::option::Option<::std::string::String>,
}
impl GetDistributionInput {
    /// <p>The distribution's ID. If the ID is empty, an empty distribution configuration is returned.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
}
impl GetDistributionInput {
    /// Creates a new builder-style object to manufacture [`GetDistributionInput`](crate::operation::get_distribution::GetDistributionInput).
    pub fn builder() -> crate::operation::get_distribution::builders::GetDistributionInputBuilder {
        crate::operation::get_distribution::builders::GetDistributionInputBuilder::default()
    }
}
/// A builder for [`GetDistributionInput`](crate::operation::get_distribution::GetDistributionInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetDistributionInputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
}
impl GetDistributionInputBuilder {
    /// <p>The distribution's ID. If the ID is empty, an empty distribution configuration is returned.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The distribution's ID. If the ID is empty, an empty distribution configuration is returned.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The distribution's ID. If the ID is empty, an empty distribution configuration is returned.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// Consumes the builder and constructs a [`GetDistributionInput`](crate::operation::get_distribution::GetDistributionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_distribution::GetDistributionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_distribution::GetDistributionInput { id: self.id })
    }
}