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
// 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 GetFolderInput {
/// <p>The Git provider.</p>
pub provider: ::std::option::Option<crate::types::GitProvider>,
/// <p>The account that the Git connection is for. The value depends on the provider:</p>
/// <ul>
/// <li>
/// <p>For GitHub, specify the user or organization name.</p></li>
/// <li>
/// <p>For GitLab, specify the user name.</p></li>
/// </ul>
/// <p>To get this value, call ListGitConnections.</p>
pub owner: ::std::option::Option<::std::string::String>,
/// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
pub repository_name: ::std::option::Option<::std::string::String>,
/// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
pub repository_path: ::std::option::Option<::std::string::String>,
/// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
pub folder_path: ::std::option::Option<::std::string::String>,
/// <p>The name of the branch to read from.</p>
pub branch: ::std::option::Option<::std::string::String>,
}
impl GetFolderInput {
/// <p>The Git provider.</p>
pub fn provider(&self) -> ::std::option::Option<&crate::types::GitProvider> {
self.provider.as_ref()
}
/// <p>The account that the Git connection is for. The value depends on the provider:</p>
/// <ul>
/// <li>
/// <p>For GitHub, specify the user or organization name.</p></li>
/// <li>
/// <p>For GitLab, specify the user name.</p></li>
/// </ul>
/// <p>To get this value, call ListGitConnections.</p>
pub fn owner(&self) -> ::std::option::Option<&str> {
self.owner.as_deref()
}
/// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
pub fn repository_name(&self) -> ::std::option::Option<&str> {
self.repository_name.as_deref()
}
/// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
pub fn repository_path(&self) -> ::std::option::Option<&str> {
self.repository_path.as_deref()
}
/// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
pub fn folder_path(&self) -> ::std::option::Option<&str> {
self.folder_path.as_deref()
}
/// <p>The name of the branch to read from.</p>
pub fn branch(&self) -> ::std::option::Option<&str> {
self.branch.as_deref()
}
}
impl GetFolderInput {
/// Creates a new builder-style object to manufacture [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
pub fn builder() -> crate::operation::get_folder::builders::GetFolderInputBuilder {
crate::operation::get_folder::builders::GetFolderInputBuilder::default()
}
}
/// A builder for [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFolderInputBuilder {
pub(crate) provider: ::std::option::Option<crate::types::GitProvider>,
pub(crate) owner: ::std::option::Option<::std::string::String>,
pub(crate) repository_name: ::std::option::Option<::std::string::String>,
pub(crate) repository_path: ::std::option::Option<::std::string::String>,
pub(crate) folder_path: ::std::option::Option<::std::string::String>,
pub(crate) branch: ::std::option::Option<::std::string::String>,
}
impl GetFolderInputBuilder {
/// <p>The Git provider.</p>
/// This field is required.
pub fn provider(mut self, input: crate::types::GitProvider) -> Self {
self.provider = ::std::option::Option::Some(input);
self
}
/// <p>The Git provider.</p>
pub fn set_provider(mut self, input: ::std::option::Option<crate::types::GitProvider>) -> Self {
self.provider = input;
self
}
/// <p>The Git provider.</p>
pub fn get_provider(&self) -> &::std::option::Option<crate::types::GitProvider> {
&self.provider
}
/// <p>The account that the Git connection is for. The value depends on the provider:</p>
/// <ul>
/// <li>
/// <p>For GitHub, specify the user or organization name.</p></li>
/// <li>
/// <p>For GitLab, specify the user name.</p></li>
/// </ul>
/// <p>To get this value, call ListGitConnections.</p>
/// This field is required.
pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner = ::std::option::Option::Some(input.into());
self
}
/// <p>The account that the Git connection is for. The value depends on the provider:</p>
/// <ul>
/// <li>
/// <p>For GitHub, specify the user or organization name.</p></li>
/// <li>
/// <p>For GitLab, specify the user name.</p></li>
/// </ul>
/// <p>To get this value, call ListGitConnections.</p>
pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner = input;
self
}
/// <p>The account that the Git connection is for. The value depends on the provider:</p>
/// <ul>
/// <li>
/// <p>For GitHub, specify the user or organization name.</p></li>
/// <li>
/// <p>For GitLab, specify the user name.</p></li>
/// </ul>
/// <p>To get this value, call ListGitConnections.</p>
pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
&self.owner
}
/// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
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, which is the last segment of RepositoryPath.</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, which is the last segment of RepositoryPath.</p>
pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
&self.repository_name
}
/// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
/// This field is required.
pub fn repository_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.repository_path = ::std::option::Option::Some(input.into());
self
}
/// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
pub fn set_repository_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.repository_path = input;
self
}
/// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
pub fn get_repository_path(&self) -> &::std::option::Option<::std::string::String> {
&self.repository_path
}
/// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</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 path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
pub fn set_folder_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.folder_path = input;
self
}
/// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
pub fn get_folder_path(&self) -> &::std::option::Option<::std::string::String> {
&self.folder_path
}
/// <p>The name of the branch to read from.</p>
/// This field is required.
pub fn branch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.branch = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the branch to read from.</p>
pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.branch = input;
self
}
/// <p>The name of the branch to read from.</p>
pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
&self.branch
}
/// Consumes the builder and constructs a [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
pub fn build(self) -> ::std::result::Result<crate::operation::get_folder::GetFolderInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_folder::GetFolderInput {
provider: self.provider,
owner: self.owner,
repository_name: self.repository_name,
repository_path: self.repository_path,
folder_path: self.folder_path,
branch: self.branch,
})
}
}