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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The toolchain template file provided with the project request. AWS CodeStar uses the template to provision the toolchain stack in AWS CloudFormation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Toolchain {
/// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
pub source: ::std::option::Option<crate::types::ToolchainSource>,
/// <p>The service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.</p>
pub stack_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Toolchain {
/// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
pub fn source(&self) -> ::std::option::Option<&crate::types::ToolchainSource> {
self.source.as_ref()
}
/// <p>The service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.</p>
pub fn stack_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.stack_parameters.as_ref()
}
}
impl Toolchain {
/// Creates a new builder-style object to manufacture [`Toolchain`](crate::types::Toolchain).
pub fn builder() -> crate::types::builders::ToolchainBuilder {
crate::types::builders::ToolchainBuilder::default()
}
}
/// A builder for [`Toolchain`](crate::types::Toolchain).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ToolchainBuilder {
pub(crate) source: ::std::option::Option<crate::types::ToolchainSource>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) stack_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ToolchainBuilder {
/// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
/// This field is required.
pub fn source(mut self, input: crate::types::ToolchainSource) -> Self {
self.source = ::std::option::Option::Some(input);
self
}
/// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
pub fn set_source(mut self, input: ::std::option::Option<crate::types::ToolchainSource>) -> Self {
self.source = input;
self
}
/// <p>The Amazon S3 location where the toolchain template file provided with the project request is stored. AWS CodeStar retrieves the file during project creation.</p>
pub fn get_source(&self) -> &::std::option::Option<crate::types::ToolchainSource> {
&self.source
}
/// <p>The service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.</p>
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 service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The service role ARN for AWS CodeStar to use for the toolchain template during stack provisioning.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Adds a key-value pair to `stack_parameters`.
///
/// To override the contents of this collection use [`set_stack_parameters`](Self::set_stack_parameters).
///
/// <p>The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.</p>
pub fn stack_parameters(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.stack_parameters.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.stack_parameters = ::std::option::Option::Some(hash_map);
self
}
/// <p>The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.</p>
pub fn set_stack_parameters(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.stack_parameters = input;
self
}
/// <p>The list of parameter overrides to be passed into the toolchain template during stack provisioning, if any.</p>
pub fn get_stack_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.stack_parameters
}
/// Consumes the builder and constructs a [`Toolchain`](crate::types::Toolchain).
pub fn build(self) -> crate::types::Toolchain {
crate::types::Toolchain {
source: self.source,
role_arn: self.role_arn,
stack_parameters: self.stack_parameters,
}
}
}