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>Specifies Lake Formation configuration settings for the crawler.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct LakeFormationConfiguration {
    /// <p>Specifies whether to use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
    pub use_lake_formation_credentials: ::std::option::Option<bool>,
    /// <p>Required for cross account crawls. For same account crawls as the target data, this can be left as null.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
}
impl LakeFormationConfiguration {
    /// <p>Specifies whether to use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
    pub fn use_lake_formation_credentials(&self) -> ::std::option::Option<bool> {
        self.use_lake_formation_credentials
    }
    /// <p>Required for cross account crawls. For same account crawls as the target data, this can be left as null.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
}
impl LakeFormationConfiguration {
    /// Creates a new builder-style object to manufacture [`LakeFormationConfiguration`](crate::types::LakeFormationConfiguration).
    pub fn builder() -> crate::types::builders::LakeFormationConfigurationBuilder {
        crate::types::builders::LakeFormationConfigurationBuilder::default()
    }
}

/// A builder for [`LakeFormationConfiguration`](crate::types::LakeFormationConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct LakeFormationConfigurationBuilder {
    pub(crate) use_lake_formation_credentials: ::std::option::Option<bool>,
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
}
impl LakeFormationConfigurationBuilder {
    /// <p>Specifies whether to use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
    pub fn use_lake_formation_credentials(mut self, input: bool) -> Self {
        self.use_lake_formation_credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
    pub fn set_use_lake_formation_credentials(mut self, input: ::std::option::Option<bool>) -> Self {
        self.use_lake_formation_credentials = input;
        self
    }
    /// <p>Specifies whether to use Lake Formation credentials for the crawler instead of the IAM role credentials.</p>
    pub fn get_use_lake_formation_credentials(&self) -> &::std::option::Option<bool> {
        &self.use_lake_formation_credentials
    }
    /// <p>Required for cross account crawls. For same account crawls as the target data, this can be left as null.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Required for cross account crawls. For same account crawls as the target data, this can be left as null.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>Required for cross account crawls. For same account crawls as the target data, this can be left as null.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// Consumes the builder and constructs a [`LakeFormationConfiguration`](crate::types::LakeFormationConfiguration).
    pub fn build(self) -> crate::types::LakeFormationConfiguration {
        crate::types::LakeFormationConfiguration {
            use_lake_formation_credentials: self.use_lake_formation_credentials,
            account_id: self.account_id,
        }
    }
}