Skip to main content

aws_sdk_glue/types/
_source_control_details.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SourceControlDetails {
7    /// <p>The provider for the remote repository.</p>
8    pub provider: ::std::option::Option<crate::types::SourceControlProvider>,
9    /// <p>The name of the remote repository that contains the job artifacts.</p>
10    pub repository: ::std::option::Option<::std::string::String>,
11    /// <p>The owner of the remote repository that contains the job artifacts.</p>
12    pub owner: ::std::option::Option<::std::string::String>,
13    /// <p>An optional branch in the remote repository.</p>
14    pub branch: ::std::option::Option<::std::string::String>,
15    /// <p>An optional folder in the remote repository.</p>
16    pub folder: ::std::option::Option<::std::string::String>,
17    /// <p>The last commit ID for a commit in the remote repository.</p>
18    pub last_commit_id: ::std::option::Option<::std::string::String>,
19    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
20    pub auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
21    /// <p>The value of an authorization token.</p>
22    pub auth_token: ::std::option::Option<::std::string::String>,
23}
24impl SourceControlDetails {
25    /// <p>The provider for the remote repository.</p>
26    pub fn provider(&self) -> ::std::option::Option<&crate::types::SourceControlProvider> {
27        self.provider.as_ref()
28    }
29    /// <p>The name of the remote repository that contains the job artifacts.</p>
30    pub fn repository(&self) -> ::std::option::Option<&str> {
31        self.repository.as_deref()
32    }
33    /// <p>The owner of the remote repository that contains the job artifacts.</p>
34    pub fn owner(&self) -> ::std::option::Option<&str> {
35        self.owner.as_deref()
36    }
37    /// <p>An optional branch in the remote repository.</p>
38    pub fn branch(&self) -> ::std::option::Option<&str> {
39        self.branch.as_deref()
40    }
41    /// <p>An optional folder in the remote repository.</p>
42    pub fn folder(&self) -> ::std::option::Option<&str> {
43        self.folder.as_deref()
44    }
45    /// <p>The last commit ID for a commit in the remote repository.</p>
46    pub fn last_commit_id(&self) -> ::std::option::Option<&str> {
47        self.last_commit_id.as_deref()
48    }
49    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
50    pub fn auth_strategy(&self) -> ::std::option::Option<&crate::types::SourceControlAuthStrategy> {
51        self.auth_strategy.as_ref()
52    }
53    /// <p>The value of an authorization token.</p>
54    pub fn auth_token(&self) -> ::std::option::Option<&str> {
55        self.auth_token.as_deref()
56    }
57}
58impl SourceControlDetails {
59    /// Creates a new builder-style object to manufacture [`SourceControlDetails`](crate::types::SourceControlDetails).
60    pub fn builder() -> crate::types::builders::SourceControlDetailsBuilder {
61        crate::types::builders::SourceControlDetailsBuilder::default()
62    }
63}
64
65/// A builder for [`SourceControlDetails`](crate::types::SourceControlDetails).
66#[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    /// <p>The provider for the remote repository.</p>
80    pub fn provider(mut self, input: crate::types::SourceControlProvider) -> Self {
81        self.provider = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The provider for the remote repository.</p>
85    pub fn set_provider(mut self, input: ::std::option::Option<crate::types::SourceControlProvider>) -> Self {
86        self.provider = input;
87        self
88    }
89    /// <p>The provider for the remote repository.</p>
90    pub fn get_provider(&self) -> &::std::option::Option<crate::types::SourceControlProvider> {
91        &self.provider
92    }
93    /// <p>The name of the remote repository that contains the job artifacts.</p>
94    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    /// <p>The name of the remote repository that contains the job artifacts.</p>
99    pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.repository = input;
101        self
102    }
103    /// <p>The name of the remote repository that contains the job artifacts.</p>
104    pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
105        &self.repository
106    }
107    /// <p>The owner of the remote repository that contains the job artifacts.</p>
108    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    /// <p>The owner of the remote repository that contains the job artifacts.</p>
113    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.owner = input;
115        self
116    }
117    /// <p>The owner of the remote repository that contains the job artifacts.</p>
118    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
119        &self.owner
120    }
121    /// <p>An optional branch in the remote repository.</p>
122    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    /// <p>An optional branch in the remote repository.</p>
127    pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.branch = input;
129        self
130    }
131    /// <p>An optional branch in the remote repository.</p>
132    pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
133        &self.branch
134    }
135    /// <p>An optional folder in the remote repository.</p>
136    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    /// <p>An optional folder in the remote repository.</p>
141    pub fn set_folder(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.folder = input;
143        self
144    }
145    /// <p>An optional folder in the remote repository.</p>
146    pub fn get_folder(&self) -> &::std::option::Option<::std::string::String> {
147        &self.folder
148    }
149    /// <p>The last commit ID for a commit in the remote repository.</p>
150    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    /// <p>The last commit ID for a commit in the remote repository.</p>
155    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    /// <p>The last commit ID for a commit in the remote repository.</p>
160    pub fn get_last_commit_id(&self) -> &::std::option::Option<::std::string::String> {
161        &self.last_commit_id
162    }
163    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
164    pub fn auth_strategy(mut self, input: crate::types::SourceControlAuthStrategy) -> Self {
165        self.auth_strategy = ::std::option::Option::Some(input);
166        self
167    }
168    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
169    pub fn set_auth_strategy(mut self, input: ::std::option::Option<crate::types::SourceControlAuthStrategy>) -> Self {
170        self.auth_strategy = input;
171        self
172    }
173    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
174    pub fn get_auth_strategy(&self) -> &::std::option::Option<crate::types::SourceControlAuthStrategy> {
175        &self.auth_strategy
176    }
177    /// <p>The value of an authorization token.</p>
178    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    /// <p>The value of an authorization token.</p>
183    pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.auth_token = input;
185        self
186    }
187    /// <p>The value of an authorization token.</p>
188    pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
189        &self.auth_token
190    }
191    /// Consumes the builder and constructs a [`SourceControlDetails`](crate::types::SourceControlDetails).
192    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}