aws_sdk_codecommit/operation/get_folder/
_get_folder_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetFolderInput {
6    /// <p>The name of the repository.</p>
7    pub repository_name: ::std::option::Option<::std::string::String>,
8    /// <p>A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.</p>
9    pub commit_specifier: ::std::option::Option<::std::string::String>,
10    /// <p>The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.</p>
11    pub folder_path: ::std::option::Option<::std::string::String>,
12}
13impl GetFolderInput {
14    /// <p>The name of the repository.</p>
15    pub fn repository_name(&self) -> ::std::option::Option<&str> {
16        self.repository_name.as_deref()
17    }
18    /// <p>A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.</p>
19    pub fn commit_specifier(&self) -> ::std::option::Option<&str> {
20        self.commit_specifier.as_deref()
21    }
22    /// <p>The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.</p>
23    pub fn folder_path(&self) -> ::std::option::Option<&str> {
24        self.folder_path.as_deref()
25    }
26}
27impl GetFolderInput {
28    /// Creates a new builder-style object to manufacture [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
29    pub fn builder() -> crate::operation::get_folder::builders::GetFolderInputBuilder {
30        crate::operation::get_folder::builders::GetFolderInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetFolderInputBuilder {
38    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
39    pub(crate) commit_specifier: ::std::option::Option<::std::string::String>,
40    pub(crate) folder_path: ::std::option::Option<::std::string::String>,
41}
42impl GetFolderInputBuilder {
43    /// <p>The name of the repository.</p>
44    /// This field is required.
45    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.repository_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the repository.</p>
50    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.repository_name = input;
52        self
53    }
54    /// <p>The name of the repository.</p>
55    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.repository_name
57    }
58    /// <p>A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.</p>
59    pub fn commit_specifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.commit_specifier = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.</p>
64    pub fn set_commit_specifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.commit_specifier = input;
66        self
67    }
68    /// <p>A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.</p>
69    pub fn get_commit_specifier(&self) -> &::std::option::Option<::std::string::String> {
70        &self.commit_specifier
71    }
72    /// <p>The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.</p>
73    /// This field is required.
74    pub fn folder_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.folder_path = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.</p>
79    pub fn set_folder_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.folder_path = input;
81        self
82    }
83    /// <p>The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.</p>
84    pub fn get_folder_path(&self) -> &::std::option::Option<::std::string::String> {
85        &self.folder_path
86    }
87    /// Consumes the builder and constructs a [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::get_folder::GetFolderInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::get_folder::GetFolderInput {
90            repository_name: self.repository_name,
91            commit_specifier: self.commit_specifier,
92            folder_path: self.folder_path,
93        })
94    }
95}