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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SourceControlDetails {
    /// <p>The provider for the remote repository.</p>
    pub provider: ::std::option::Option<crate::types::SourceControlProvider>,
    /// <p>The name of the remote repository that contains the job artifacts.</p>
    pub repository: ::std::option::Option<::std::string::String>,
    /// <p>The owner of the remote repository that contains the job artifacts.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>An optional branch in the remote repository.</p>
    pub branch: ::std::option::Option<::std::string::String>,
    /// <p>An optional folder in the remote repository.</p>
    pub folder: ::std::option::Option<::std::string::String>,
    /// <p>The last commit ID for a commit in the remote repository.</p>
    pub last_commit_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
    pub auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
    /// <p>The value of an authorization token.</p>
    pub auth_token: ::std::option::Option<::std::string::String>,
}
impl SourceControlDetails {
    /// <p>The provider for the remote repository.</p>
    pub fn provider(&self) -> ::std::option::Option<&crate::types::SourceControlProvider> {
        self.provider.as_ref()
    }
    /// <p>The name of the remote repository that contains the job artifacts.</p>
    pub fn repository(&self) -> ::std::option::Option<&str> {
        self.repository.as_deref()
    }
    /// <p>The owner of the remote repository that contains the job artifacts.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>An optional branch in the remote repository.</p>
    pub fn branch(&self) -> ::std::option::Option<&str> {
        self.branch.as_deref()
    }
    /// <p>An optional folder in the remote repository.</p>
    pub fn folder(&self) -> ::std::option::Option<&str> {
        self.folder.as_deref()
    }
    /// <p>The last commit ID for a commit in the remote repository.</p>
    pub fn last_commit_id(&self) -> ::std::option::Option<&str> {
        self.last_commit_id.as_deref()
    }
    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
    pub fn auth_strategy(&self) -> ::std::option::Option<&crate::types::SourceControlAuthStrategy> {
        self.auth_strategy.as_ref()
    }
    /// <p>The value of an authorization token.</p>
    pub fn auth_token(&self) -> ::std::option::Option<&str> {
        self.auth_token.as_deref()
    }
}
impl SourceControlDetails {
    /// Creates a new builder-style object to manufacture [`SourceControlDetails`](crate::types::SourceControlDetails).
    pub fn builder() -> crate::types::builders::SourceControlDetailsBuilder {
        crate::types::builders::SourceControlDetailsBuilder::default()
    }
}

/// A builder for [`SourceControlDetails`](crate::types::SourceControlDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SourceControlDetailsBuilder {
    pub(crate) provider: ::std::option::Option<crate::types::SourceControlProvider>,
    pub(crate) repository: ::std::option::Option<::std::string::String>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) branch: ::std::option::Option<::std::string::String>,
    pub(crate) folder: ::std::option::Option<::std::string::String>,
    pub(crate) last_commit_id: ::std::option::Option<::std::string::String>,
    pub(crate) auth_strategy: ::std::option::Option<crate::types::SourceControlAuthStrategy>,
    pub(crate) auth_token: ::std::option::Option<::std::string::String>,
}
impl SourceControlDetailsBuilder {
    /// <p>The provider for the remote repository.</p>
    pub fn provider(mut self, input: crate::types::SourceControlProvider) -> Self {
        self.provider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The provider for the remote repository.</p>
    pub fn set_provider(mut self, input: ::std::option::Option<crate::types::SourceControlProvider>) -> Self {
        self.provider = input;
        self
    }
    /// <p>The provider for the remote repository.</p>
    pub fn get_provider(&self) -> &::std::option::Option<crate::types::SourceControlProvider> {
        &self.provider
    }
    /// <p>The name of the remote repository that contains the job artifacts.</p>
    pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the remote repository that contains the job artifacts.</p>
    pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository = input;
        self
    }
    /// <p>The name of the remote repository that contains the job artifacts.</p>
    pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository
    }
    /// <p>The owner of the remote repository that contains the job artifacts.</p>
    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 owner of the remote repository that contains the job artifacts.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The owner of the remote repository that contains the job artifacts.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>An optional branch in the remote repository.</p>
    pub fn branch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.branch = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An optional branch in the remote repository.</p>
    pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.branch = input;
        self
    }
    /// <p>An optional branch in the remote repository.</p>
    pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
        &self.branch
    }
    /// <p>An optional folder in the remote repository.</p>
    pub fn folder(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.folder = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An optional folder in the remote repository.</p>
    pub fn set_folder(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.folder = input;
        self
    }
    /// <p>An optional folder in the remote repository.</p>
    pub fn get_folder(&self) -> &::std::option::Option<::std::string::String> {
        &self.folder
    }
    /// <p>The last commit ID for a commit in the remote repository.</p>
    pub fn last_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_commit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The last commit ID for a commit in the remote repository.</p>
    pub fn set_last_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_commit_id = input;
        self
    }
    /// <p>The last commit ID for a commit in the remote repository.</p>
    pub fn get_last_commit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_commit_id
    }
    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
    pub fn auth_strategy(mut self, input: crate::types::SourceControlAuthStrategy) -> Self {
        self.auth_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
    pub fn set_auth_strategy(mut self, input: ::std::option::Option<crate::types::SourceControlAuthStrategy>) -> Self {
        self.auth_strategy = input;
        self
    }
    /// <p>The type of authentication, which can be an authentication token stored in Amazon Web Services Secrets Manager, or a personal access token.</p>
    pub fn get_auth_strategy(&self) -> &::std::option::Option<crate::types::SourceControlAuthStrategy> {
        &self.auth_strategy
    }
    /// <p>The value of an authorization token.</p>
    pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auth_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value of an authorization token.</p>
    pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auth_token = input;
        self
    }
    /// <p>The value of an authorization token.</p>
    pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.auth_token
    }
    /// Consumes the builder and constructs a [`SourceControlDetails`](crate::types::SourceControlDetails).
    pub fn build(self) -> crate::types::SourceControlDetails {
        crate::types::SourceControlDetails {
            provider: self.provider,
            repository: self.repository,
            owner: self.owner,
            branch: self.branch,
            folder: self.folder,
            last_commit_id: self.last_commit_id,
            auth_strategy: self.auth_strategy,
            auth_token: self.auth_token,
        }
    }
}