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>Returns information about a folder in a repository.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Folder {
    /// <p>The full SHA-1 pointer of the tree information for the commit that contains the folder.</p>
    pub tree_id: ::std::option::Option<::std::string::String>,
    /// <p>The fully qualified path of the folder in the repository.</p>
    pub absolute_path: ::std::option::Option<::std::string::String>,
    /// <p>The relative path of the specified folder from the folder where the query originated.</p>
    pub relative_path: ::std::option::Option<::std::string::String>,
}
impl Folder {
    /// <p>The full SHA-1 pointer of the tree information for the commit that contains the folder.</p>
    pub fn tree_id(&self) -> ::std::option::Option<&str> {
        self.tree_id.as_deref()
    }
    /// <p>The fully qualified path of the folder in the repository.</p>
    pub fn absolute_path(&self) -> ::std::option::Option<&str> {
        self.absolute_path.as_deref()
    }
    /// <p>The relative path of the specified folder from the folder where the query originated.</p>
    pub fn relative_path(&self) -> ::std::option::Option<&str> {
        self.relative_path.as_deref()
    }
}
impl Folder {
    /// Creates a new builder-style object to manufacture [`Folder`](crate::types::Folder).
    pub fn builder() -> crate::types::builders::FolderBuilder {
        crate::types::builders::FolderBuilder::default()
    }
}

/// A builder for [`Folder`](crate::types::Folder).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FolderBuilder {
    pub(crate) tree_id: ::std::option::Option<::std::string::String>,
    pub(crate) absolute_path: ::std::option::Option<::std::string::String>,
    pub(crate) relative_path: ::std::option::Option<::std::string::String>,
}
impl FolderBuilder {
    /// <p>The full SHA-1 pointer of the tree information for the commit that contains the folder.</p>
    pub fn tree_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tree_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The full SHA-1 pointer of the tree information for the commit that contains the folder.</p>
    pub fn set_tree_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tree_id = input;
        self
    }
    /// <p>The full SHA-1 pointer of the tree information for the commit that contains the folder.</p>
    pub fn get_tree_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.tree_id
    }
    /// <p>The fully qualified path of the folder in the repository.</p>
    pub fn absolute_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.absolute_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fully qualified path of the folder in the repository.</p>
    pub fn set_absolute_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.absolute_path = input;
        self
    }
    /// <p>The fully qualified path of the folder in the repository.</p>
    pub fn get_absolute_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.absolute_path
    }
    /// <p>The relative path of the specified folder from the folder where the query originated.</p>
    pub fn relative_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.relative_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The relative path of the specified folder from the folder where the query originated.</p>
    pub fn set_relative_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.relative_path = input;
        self
    }
    /// <p>The relative path of the specified folder from the folder where the query originated.</p>
    pub fn get_relative_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.relative_path
    }
    /// Consumes the builder and constructs a [`Folder`](crate::types::Folder).
    pub fn build(self) -> crate::types::Folder {
        crate::types::Folder {
            tree_id: self.tree_id,
            absolute_path: self.absolute_path,
            relative_path: self.relative_path,
        }
    }
}