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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A list of source plugin types used in the pipeline configuration (such as <code>cloudwatch_logs</code> or <code>s3</code>). Currently supports a single source per pipeline, but is structured as a list to accommodate multiple pipelines in the configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Source {
/// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
pub r#type: ::std::option::Option<::std::string::String>,
}
impl Source {
/// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
pub fn r#type(&self) -> ::std::option::Option<&str> {
self.r#type.as_deref()
}
}
impl Source {
/// Creates a new builder-style object to manufacture [`Source`](crate::types::Source).
pub fn builder() -> crate::types::builders::SourceBuilder {
crate::types::builders::SourceBuilder::default()
}
}
/// A builder for [`Source`](crate::types::Source).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SourceBuilder {
pub(crate) r#type: ::std::option::Option<::std::string::String>,
}
impl SourceBuilder {
/// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
/// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
/// <p>The plugin name of the source, such as <code>cloudwatch_logs</code> or <code>s3</code>.</p>
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
/// Consumes the builder and constructs a [`Source`](crate::types::Source).
pub fn build(self) -> crate::types::Source {
crate::types::Source { r#type: self.r#type }
}
}