aws-sdk-codecommit 1.99.0

AWS SDK for AWS CodeCommit
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the input of a get repository operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRepositoryInput {
    /// <p>The name of the repository to get information about.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
}
impl GetRepositoryInput {
    /// <p>The name of the repository to get information about.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
}
impl GetRepositoryInput {
    /// Creates a new builder-style object to manufacture [`GetRepositoryInput`](crate::operation::get_repository::GetRepositoryInput).
    pub fn builder() -> crate::operation::get_repository::builders::GetRepositoryInputBuilder {
        crate::operation::get_repository::builders::GetRepositoryInputBuilder::default()
    }
}

/// A builder for [`GetRepositoryInput`](crate::operation::get_repository::GetRepositoryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRepositoryInputBuilder {
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
}
impl GetRepositoryInputBuilder {
    /// <p>The name of the repository to get information about.</p>
    /// This field is required.
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository to get information about.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository to get information about.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// Consumes the builder and constructs a [`GetRepositoryInput`](crate::operation::get_repository::GetRepositoryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_repository::GetRepositoryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_repository::GetRepositoryInput {
            repository_name: self.repository_name,
        })
    }
}