aws_sdk_glue/types/
_source_control_details.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SourceControlDetails {
7 pub provider: ::std::option::Option<crate::types::SourceControlProvider>,
9 pub repository: ::std::option::Option<::std::string::String>,
11 pub owner: ::std::option::Option<::std::string::String>,
13 pub branch: ::std::option::Option<::std::string::String>,
15 pub folder: ::std::option::Option<::std::string::String>,
17 pub last_commit_id: ::std::option::Option<::std::string::String>,
19 pub auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
21 pub auth_token: ::std::option::Option<::std::string::String>,
23}
24impl SourceControlDetails {
25 pub fn provider(&self) -> ::std::option::Option<&crate::types::SourceControlProvider> {
27 self.provider.as_ref()
28 }
29 pub fn repository(&self) -> ::std::option::Option<&str> {
31 self.repository.as_deref()
32 }
33 pub fn owner(&self) -> ::std::option::Option<&str> {
35 self.owner.as_deref()
36 }
37 pub fn branch(&self) -> ::std::option::Option<&str> {
39 self.branch.as_deref()
40 }
41 pub fn folder(&self) -> ::std::option::Option<&str> {
43 self.folder.as_deref()
44 }
45 pub fn last_commit_id(&self) -> ::std::option::Option<&str> {
47 self.last_commit_id.as_deref()
48 }
49 pub fn auth_strategy(&self) -> ::std::option::Option<&crate::types::SourceControlAuthStrategy> {
51 self.auth_strategy.as_ref()
52 }
53 pub fn auth_token(&self) -> ::std::option::Option<&str> {
55 self.auth_token.as_deref()
56 }
57}
58impl SourceControlDetails {
59 pub fn builder() -> crate::types::builders::SourceControlDetailsBuilder {
61 crate::types::builders::SourceControlDetailsBuilder::default()
62 }
63}
64
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
67#[non_exhaustive]
68pub struct SourceControlDetailsBuilder {
69 pub(crate) provider: ::std::option::Option<crate::types::SourceControlProvider>,
70 pub(crate) repository: ::std::option::Option<::std::string::String>,
71 pub(crate) owner: ::std::option::Option<::std::string::String>,
72 pub(crate) branch: ::std::option::Option<::std::string::String>,
73 pub(crate) folder: ::std::option::Option<::std::string::String>,
74 pub(crate) last_commit_id: ::std::option::Option<::std::string::String>,
75 pub(crate) auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
76 pub(crate) auth_token: ::std::option::Option<::std::string::String>,
77}
78impl SourceControlDetailsBuilder {
79 pub fn provider(mut self, input: crate::types::SourceControlProvider) -> Self {
81 self.provider = ::std::option::Option::Some(input);
82 self
83 }
84 pub fn set_provider(mut self, input: ::std::option::Option<crate::types::SourceControlProvider>) -> Self {
86 self.provider = input;
87 self
88 }
89 pub fn get_provider(&self) -> &::std::option::Option<crate::types::SourceControlProvider> {
91 &self.provider
92 }
93 pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.repository = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.repository = input;
101 self
102 }
103 pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
105 &self.repository
106 }
107 pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.owner = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.owner = input;
115 self
116 }
117 pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
119 &self.owner
120 }
121 pub fn branch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.branch = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.branch = input;
129 self
130 }
131 pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
133 &self.branch
134 }
135 pub fn folder(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137 self.folder = ::std::option::Option::Some(input.into());
138 self
139 }
140 pub fn set_folder(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142 self.folder = input;
143 self
144 }
145 pub fn get_folder(&self) -> &::std::option::Option<::std::string::String> {
147 &self.folder
148 }
149 pub fn last_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.last_commit_id = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_last_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.last_commit_id = input;
157 self
158 }
159 pub fn get_last_commit_id(&self) -> &::std::option::Option<::std::string::String> {
161 &self.last_commit_id
162 }
163 pub fn auth_strategy(mut self, input: crate::types::SourceControlAuthStrategy) -> Self {
165 self.auth_strategy = ::std::option::Option::Some(input);
166 self
167 }
168 pub fn set_auth_strategy(mut self, input: ::std::option::Option<crate::types::SourceControlAuthStrategy>) -> Self {
170 self.auth_strategy = input;
171 self
172 }
173 pub fn get_auth_strategy(&self) -> &::std::option::Option<crate::types::SourceControlAuthStrategy> {
175 &self.auth_strategy
176 }
177 pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.auth_token = ::std::option::Option::Some(input.into());
180 self
181 }
182 pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.auth_token = input;
185 self
186 }
187 pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
189 &self.auth_token
190 }
191 pub fn build(self) -> crate::types::SourceControlDetails {
193 crate::types::SourceControlDetails {
194 provider: self.provider,
195 repository: self.repository,
196 owner: self.owner,
197 branch: self.branch,
198 folder: self.folder,
199 last_commit_id: self.last_commit_id,
200 auth_strategy: self.auth_strategy,
201 auth_token: self.auth_token,
202 }
203 }
204}