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

/// <p>Amazon Security Lake can collect logs and events from natively-supported Amazon Web Services services.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsLogSourceResource {
    /// <p>The name for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub source_name: ::std::option::Option<crate::types::AwsLogSourceName>,
    /// <p>The version for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub source_version: ::std::option::Option<::std::string::String>,
}
impl AwsLogSourceResource {
    /// <p>The name for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn source_name(&self) -> ::std::option::Option<&crate::types::AwsLogSourceName> {
        self.source_name.as_ref()
    }
    /// <p>The version for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn source_version(&self) -> ::std::option::Option<&str> {
        self.source_version.as_deref()
    }
}
impl AwsLogSourceResource {
    /// Creates a new builder-style object to manufacture [`AwsLogSourceResource`](crate::types::AwsLogSourceResource).
    pub fn builder() -> crate::types::builders::AwsLogSourceResourceBuilder {
        crate::types::builders::AwsLogSourceResourceBuilder::default()
    }
}

/// A builder for [`AwsLogSourceResource`](crate::types::AwsLogSourceResource).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AwsLogSourceResourceBuilder {
    pub(crate) source_name: ::std::option::Option<crate::types::AwsLogSourceName>,
    pub(crate) source_version: ::std::option::Option<::std::string::String>,
}
impl AwsLogSourceResourceBuilder {
    /// <p>The name for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn source_name(mut self, input: crate::types::AwsLogSourceName) -> Self {
        self.source_name = ::std::option::Option::Some(input);
        self
    }
    /// <p>The name for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn set_source_name(mut self, input: ::std::option::Option<crate::types::AwsLogSourceName>) -> Self {
        self.source_name = input;
        self
    }
    /// <p>The name for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn get_source_name(&self) -> &::std::option::Option<crate::types::AwsLogSourceName> {
        &self.source_name
    }
    /// <p>The version for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn source_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn set_source_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_version = input;
        self
    }
    /// <p>The version for a Amazon Web Services source. This must be a Regionally unique value.</p>
    pub fn get_source_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_version
    }
    /// Consumes the builder and constructs a [`AwsLogSourceResource`](crate::types::AwsLogSourceResource).
    pub fn build(self) -> crate::types::AwsLogSourceResource {
        crate::types::AwsLogSourceResource {
            source_name: self.source_name,
            source_version: self.source_version,
        }
    }
}