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 list branches operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListBranchesInput {
    /// <p>The name of the repository that contains the branches.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>An enumeration token that allows the operation to batch the results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListBranchesInput {
    /// <p>The name of the repository that contains the branches.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>An enumeration token that allows the operation to batch the results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListBranchesInput {
    /// Creates a new builder-style object to manufacture [`ListBranchesInput`](crate::operation::list_branches::ListBranchesInput).
    pub fn builder() -> crate::operation::list_branches::builders::ListBranchesInputBuilder {
        crate::operation::list_branches::builders::ListBranchesInputBuilder::default()
    }
}

/// A builder for [`ListBranchesInput`](crate::operation::list_branches::ListBranchesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListBranchesInputBuilder {
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListBranchesInputBuilder {
    /// <p>The name of the repository that contains the branches.</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 that contains the branches.</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 that contains the branches.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// <p>An enumeration token that allows the operation to batch the results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An enumeration token that allows the operation to batch the results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>An enumeration token that allows the operation to batch the results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListBranchesInput`](crate::operation::list_branches::ListBranchesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_branches::ListBranchesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_branches::ListBranchesInput {
            repository_name: self.repository_name,
            next_token: self.next_token,
        })
    }
}