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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetFolderOutput {
    /// <p>The full commit ID used as a reference for the returned version of the folder content.</p>
    pub commit_id: ::std::string::String,
    /// <p>The fully qualified path of the folder whose contents are returned.</p>
    pub folder_path: ::std::string::String,
    /// <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 list of folders that exist under the specified folder, if any.</p>
    pub sub_folders: ::std::option::Option<::std::vec::Vec<crate::types::Folder>>,
    /// <p>The list of files in the specified folder, if any.</p>
    pub files: ::std::option::Option<::std::vec::Vec<crate::types::File>>,
    /// <p>The list of symbolic links to other files and folders in the specified folder, if any.</p>
    pub symbolic_links: ::std::option::Option<::std::vec::Vec<crate::types::SymbolicLink>>,
    /// <p>The list of submodules in the specified folder, if any.</p>
    pub sub_modules: ::std::option::Option<::std::vec::Vec<crate::types::SubModule>>,
    _request_id: Option<String>,
}
impl GetFolderOutput {
    /// <p>The full commit ID used as a reference for the returned version of the folder content.</p>
    pub fn commit_id(&self) -> &str {
        use std::ops::Deref;
        self.commit_id.deref()
    }
    /// <p>The fully qualified path of the folder whose contents are returned.</p>
    pub fn folder_path(&self) -> &str {
        use std::ops::Deref;
        self.folder_path.deref()
    }
    /// <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 list of folders that exist under the specified folder, if any.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sub_folders.is_none()`.
    pub fn sub_folders(&self) -> &[crate::types::Folder] {
        self.sub_folders.as_deref().unwrap_or_default()
    }
    /// <p>The list of files in the specified folder, if any.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.files.is_none()`.
    pub fn files(&self) -> &[crate::types::File] {
        self.files.as_deref().unwrap_or_default()
    }
    /// <p>The list of symbolic links to other files and folders in the specified folder, if any.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.symbolic_links.is_none()`.
    pub fn symbolic_links(&self) -> &[crate::types::SymbolicLink] {
        self.symbolic_links.as_deref().unwrap_or_default()
    }
    /// <p>The list of submodules in the specified folder, if any.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.sub_modules.is_none()`.
    pub fn sub_modules(&self) -> &[crate::types::SubModule] {
        self.sub_modules.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for GetFolderOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetFolderOutput {
    /// Creates a new builder-style object to manufacture [`GetFolderOutput`](crate::operation::get_folder::GetFolderOutput).
    pub fn builder() -> crate::operation::get_folder::builders::GetFolderOutputBuilder {
        crate::operation::get_folder::builders::GetFolderOutputBuilder::default()
    }
}

/// A builder for [`GetFolderOutput`](crate::operation::get_folder::GetFolderOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetFolderOutputBuilder {
    pub(crate) commit_id: ::std::option::Option<::std::string::String>,
    pub(crate) folder_path: ::std::option::Option<::std::string::String>,
    pub(crate) tree_id: ::std::option::Option<::std::string::String>,
    pub(crate) sub_folders: ::std::option::Option<::std::vec::Vec<crate::types::Folder>>,
    pub(crate) files: ::std::option::Option<::std::vec::Vec<crate::types::File>>,
    pub(crate) symbolic_links: ::std::option::Option<::std::vec::Vec<crate::types::SymbolicLink>>,
    pub(crate) sub_modules: ::std::option::Option<::std::vec::Vec<crate::types::SubModule>>,
    _request_id: Option<String>,
}
impl GetFolderOutputBuilder {
    /// <p>The full commit ID used as a reference for the returned version of the folder content.</p>
    /// This field is required.
    pub fn commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.commit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The full commit ID used as a reference for the returned version of the folder content.</p>
    pub fn set_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.commit_id = input;
        self
    }
    /// <p>The full commit ID used as a reference for the returned version of the folder content.</p>
    pub fn get_commit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.commit_id
    }
    /// <p>The fully qualified path of the folder whose contents are returned.</p>
    /// This field is required.
    pub fn folder_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.folder_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fully qualified path of the folder whose contents are returned.</p>
    pub fn set_folder_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.folder_path = input;
        self
    }
    /// <p>The fully qualified path of the folder whose contents are returned.</p>
    pub fn get_folder_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.folder_path
    }
    /// <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
    }
    /// Appends an item to `sub_folders`.
    ///
    /// To override the contents of this collection use [`set_sub_folders`](Self::set_sub_folders).
    ///
    /// <p>The list of folders that exist under the specified folder, if any.</p>
    pub fn sub_folders(mut self, input: crate::types::Folder) -> Self {
        let mut v = self.sub_folders.unwrap_or_default();
        v.push(input);
        self.sub_folders = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of folders that exist under the specified folder, if any.</p>
    pub fn set_sub_folders(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Folder>>) -> Self {
        self.sub_folders = input;
        self
    }
    /// <p>The list of folders that exist under the specified folder, if any.</p>
    pub fn get_sub_folders(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Folder>> {
        &self.sub_folders
    }
    /// Appends an item to `files`.
    ///
    /// To override the contents of this collection use [`set_files`](Self::set_files).
    ///
    /// <p>The list of files in the specified folder, if any.</p>
    pub fn files(mut self, input: crate::types::File) -> Self {
        let mut v = self.files.unwrap_or_default();
        v.push(input);
        self.files = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of files in the specified folder, if any.</p>
    pub fn set_files(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::File>>) -> Self {
        self.files = input;
        self
    }
    /// <p>The list of files in the specified folder, if any.</p>
    pub fn get_files(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::File>> {
        &self.files
    }
    /// Appends an item to `symbolic_links`.
    ///
    /// To override the contents of this collection use [`set_symbolic_links`](Self::set_symbolic_links).
    ///
    /// <p>The list of symbolic links to other files and folders in the specified folder, if any.</p>
    pub fn symbolic_links(mut self, input: crate::types::SymbolicLink) -> Self {
        let mut v = self.symbolic_links.unwrap_or_default();
        v.push(input);
        self.symbolic_links = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of symbolic links to other files and folders in the specified folder, if any.</p>
    pub fn set_symbolic_links(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SymbolicLink>>) -> Self {
        self.symbolic_links = input;
        self
    }
    /// <p>The list of symbolic links to other files and folders in the specified folder, if any.</p>
    pub fn get_symbolic_links(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SymbolicLink>> {
        &self.symbolic_links
    }
    /// Appends an item to `sub_modules`.
    ///
    /// To override the contents of this collection use [`set_sub_modules`](Self::set_sub_modules).
    ///
    /// <p>The list of submodules in the specified folder, if any.</p>
    pub fn sub_modules(mut self, input: crate::types::SubModule) -> Self {
        let mut v = self.sub_modules.unwrap_or_default();
        v.push(input);
        self.sub_modules = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of submodules in the specified folder, if any.</p>
    pub fn set_sub_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubModule>>) -> Self {
        self.sub_modules = input;
        self
    }
    /// <p>The list of submodules in the specified folder, if any.</p>
    pub fn get_sub_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubModule>> {
        &self.sub_modules
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetFolderOutput`](crate::operation::get_folder::GetFolderOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`commit_id`](crate::operation::get_folder::builders::GetFolderOutputBuilder::commit_id)
    /// - [`folder_path`](crate::operation::get_folder::builders::GetFolderOutputBuilder::folder_path)
    pub fn build(self) -> ::std::result::Result<crate::operation::get_folder::GetFolderOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_folder::GetFolderOutput {
            commit_id: self.commit_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "commit_id",
                    "commit_id was not specified but it is required when building GetFolderOutput",
                )
            })?,
            folder_path: self.folder_path.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "folder_path",
                    "folder_path was not specified but it is required when building GetFolderOutput",
                )
            })?,
            tree_id: self.tree_id,
            sub_folders: self.sub_folders,
            files: self.files,
            symbolic_links: self.symbolic_links,
            sub_modules: self.sub_modules,
            _request_id: self._request_id,
        })
    }
}