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
// 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 CreateSyncConfigurationInput {
/// <p>The branch in the repository from which changes will be synced.</p>
pub branch: ::std::option::Option<::std::string::String>,
/// <p>The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.</p>
pub config_file: ::std::option::Option<::std::string::String>,
/// <p>The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.</p>
pub repository_link_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.</p>
pub resource_name: ::std::option::Option<::std::string::String>,
/// <p>The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>The type of sync configuration.</p>
pub sync_type: ::std::option::Option<crate::types::SyncConfigurationType>,
/// <p>Whether to enable or disable publishing of deployment status to source providers.</p>
pub publish_deployment_status: ::std::option::Option<crate::types::PublishDeploymentStatus>,
/// <p>When to trigger Git sync to begin the stack update.</p>
pub trigger_resource_update_on: ::std::option::Option<crate::types::TriggerResourceUpdateOn>,
/// <p>A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.</p>
pub pull_request_comment: ::std::option::Option<crate::types::PullRequestComment>,
}
impl CreateSyncConfigurationInput {
/// <p>The branch in the repository from which changes will be synced.</p>
pub fn branch(&self) -> ::std::option::Option<&str> {
self.branch.as_deref()
}
/// <p>The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.</p>
pub fn config_file(&self) -> ::std::option::Option<&str> {
self.config_file.as_deref()
}
/// <p>The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.</p>
pub fn repository_link_id(&self) -> ::std::option::Option<&str> {
self.repository_link_id.as_deref()
}
/// <p>The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.</p>
pub fn resource_name(&self) -> ::std::option::Option<&str> {
self.resource_name.as_deref()
}
/// <p>The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The type of sync configuration.</p>
pub fn sync_type(&self) -> ::std::option::Option<&crate::types::SyncConfigurationType> {
self.sync_type.as_ref()
}
/// <p>Whether to enable or disable publishing of deployment status to source providers.</p>
pub fn publish_deployment_status(&self) -> ::std::option::Option<&crate::types::PublishDeploymentStatus> {
self.publish_deployment_status.as_ref()
}
/// <p>When to trigger Git sync to begin the stack update.</p>
pub fn trigger_resource_update_on(&self) -> ::std::option::Option<&crate::types::TriggerResourceUpdateOn> {
self.trigger_resource_update_on.as_ref()
}
/// <p>A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.</p>
pub fn pull_request_comment(&self) -> ::std::option::Option<&crate::types::PullRequestComment> {
self.pull_request_comment.as_ref()
}
}
impl CreateSyncConfigurationInput {
/// Creates a new builder-style object to manufacture [`CreateSyncConfigurationInput`](crate::operation::create_sync_configuration::CreateSyncConfigurationInput).
pub fn builder() -> crate::operation::create_sync_configuration::builders::CreateSyncConfigurationInputBuilder {
crate::operation::create_sync_configuration::builders::CreateSyncConfigurationInputBuilder::default()
}
}
/// A builder for [`CreateSyncConfigurationInput`](crate::operation::create_sync_configuration::CreateSyncConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSyncConfigurationInputBuilder {
pub(crate) branch: ::std::option::Option<::std::string::String>,
pub(crate) config_file: ::std::option::Option<::std::string::String>,
pub(crate) repository_link_id: ::std::option::Option<::std::string::String>,
pub(crate) resource_name: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) sync_type: ::std::option::Option<crate::types::SyncConfigurationType>,
pub(crate) publish_deployment_status: ::std::option::Option<crate::types::PublishDeploymentStatus>,
pub(crate) trigger_resource_update_on: ::std::option::Option<crate::types::TriggerResourceUpdateOn>,
pub(crate) pull_request_comment: ::std::option::Option<crate::types::PullRequestComment>,
}
impl CreateSyncConfigurationInputBuilder {
/// <p>The branch in the repository from which changes will be synced.</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 branch in the repository from which changes will be synced.</p>
pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.branch = input;
self
}
/// <p>The branch in the repository from which changes will be synced.</p>
pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
&self.branch
}
/// <p>The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.</p>
/// This field is required.
pub fn config_file(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.config_file = ::std::option::Option::Some(input.into());
self
}
/// <p>The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.</p>
pub fn set_config_file(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.config_file = input;
self
}
/// <p>The file name of the configuration file that manages syncing between the connection and the repository. This configuration file is stored in the repository.</p>
pub fn get_config_file(&self) -> &::std::option::Option<::std::string::String> {
&self.config_file
}
/// <p>The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.</p>
/// This field is required.
pub fn repository_link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.repository_link_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.</p>
pub fn set_repository_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.repository_link_id = input;
self
}
/// <p>The ID of the repository link created for the connection. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.</p>
pub fn get_repository_link_id(&self) -> &::std::option::Option<::std::string::String> {
&self.repository_link_id
}
/// <p>The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.</p>
/// This field is required.
pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.</p>
pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_name = input;
self
}
/// <p>The name of the Amazon Web Services resource (for example, a CloudFormation stack in the case of CFN_STACK_SYNC) that will be synchronized from the linked repository.</p>
pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_name
}
/// <p>The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.</p>
/// This field is required.
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The ARN of the IAM role that grants permission for Amazon Web Services to use Git sync to update a given Amazon Web Services resource on your behalf.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>The type of sync configuration.</p>
/// This field is required.
pub fn sync_type(mut self, input: crate::types::SyncConfigurationType) -> Self {
self.sync_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of sync configuration.</p>
pub fn set_sync_type(mut self, input: ::std::option::Option<crate::types::SyncConfigurationType>) -> Self {
self.sync_type = input;
self
}
/// <p>The type of sync configuration.</p>
pub fn get_sync_type(&self) -> &::std::option::Option<crate::types::SyncConfigurationType> {
&self.sync_type
}
/// <p>Whether to enable or disable publishing of deployment status to source providers.</p>
pub fn publish_deployment_status(mut self, input: crate::types::PublishDeploymentStatus) -> Self {
self.publish_deployment_status = ::std::option::Option::Some(input);
self
}
/// <p>Whether to enable or disable publishing of deployment status to source providers.</p>
pub fn set_publish_deployment_status(mut self, input: ::std::option::Option<crate::types::PublishDeploymentStatus>) -> Self {
self.publish_deployment_status = input;
self
}
/// <p>Whether to enable or disable publishing of deployment status to source providers.</p>
pub fn get_publish_deployment_status(&self) -> &::std::option::Option<crate::types::PublishDeploymentStatus> {
&self.publish_deployment_status
}
/// <p>When to trigger Git sync to begin the stack update.</p>
pub fn trigger_resource_update_on(mut self, input: crate::types::TriggerResourceUpdateOn) -> Self {
self.trigger_resource_update_on = ::std::option::Option::Some(input);
self
}
/// <p>When to trigger Git sync to begin the stack update.</p>
pub fn set_trigger_resource_update_on(mut self, input: ::std::option::Option<crate::types::TriggerResourceUpdateOn>) -> Self {
self.trigger_resource_update_on = input;
self
}
/// <p>When to trigger Git sync to begin the stack update.</p>
pub fn get_trigger_resource_update_on(&self) -> &::std::option::Option<crate::types::TriggerResourceUpdateOn> {
&self.trigger_resource_update_on
}
/// <p>A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.</p>
pub fn pull_request_comment(mut self, input: crate::types::PullRequestComment) -> Self {
self.pull_request_comment = ::std::option::Option::Some(input);
self
}
/// <p>A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.</p>
pub fn set_pull_request_comment(mut self, input: ::std::option::Option<crate::types::PullRequestComment>) -> Self {
self.pull_request_comment = input;
self
}
/// <p>A toggle that specifies whether to enable or disable pull request comments for the sync configuration to be created.</p>
pub fn get_pull_request_comment(&self) -> &::std::option::Option<crate::types::PullRequestComment> {
&self.pull_request_comment
}
/// Consumes the builder and constructs a [`CreateSyncConfigurationInput`](crate::operation::create_sync_configuration::CreateSyncConfigurationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_sync_configuration::CreateSyncConfigurationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_sync_configuration::CreateSyncConfigurationInput {
branch: self.branch,
config_file: self.config_file,
repository_link_id: self.repository_link_id,
resource_name: self.resource_name,
role_arn: self.role_arn,
sync_type: self.sync_type,
publish_deployment_status: self.publish_deployment_status,
trigger_resource_update_on: self.trigger_resource_update_on,
pull_request_comment: self.pull_request_comment,
})
}
}