aws_sdk_securitylake/operation/create_data_lake/
_create_data_lake_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateDataLakeInput {
6    /// <p>Specify the Region or Regions that will contribute data to the rollup region.</p>
7    pub configurations: ::std::option::Option<::std::vec::Vec<crate::types::DataLakeConfiguration>>,
8    /// <p>The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.</p>
9    pub meta_store_manager_role_arn: ::std::option::Option<::std::string::String>,
10    /// <p>An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string.</p>
11    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
12}
13impl CreateDataLakeInput {
14    /// <p>Specify the Region or Regions that will contribute data to the rollup region.</p>
15    ///
16    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.configurations.is_none()`.
17    pub fn configurations(&self) -> &[crate::types::DataLakeConfiguration] {
18        self.configurations.as_deref().unwrap_or_default()
19    }
20    /// <p>The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.</p>
21    pub fn meta_store_manager_role_arn(&self) -> ::std::option::Option<&str> {
22        self.meta_store_manager_role_arn.as_deref()
23    }
24    /// <p>An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string.</p>
25    ///
26    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
27    pub fn tags(&self) -> &[crate::types::Tag] {
28        self.tags.as_deref().unwrap_or_default()
29    }
30}
31impl CreateDataLakeInput {
32    /// Creates a new builder-style object to manufacture [`CreateDataLakeInput`](crate::operation::create_data_lake::CreateDataLakeInput).
33    pub fn builder() -> crate::operation::create_data_lake::builders::CreateDataLakeInputBuilder {
34        crate::operation::create_data_lake::builders::CreateDataLakeInputBuilder::default()
35    }
36}
37
38/// A builder for [`CreateDataLakeInput`](crate::operation::create_data_lake::CreateDataLakeInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct CreateDataLakeInputBuilder {
42    pub(crate) configurations: ::std::option::Option<::std::vec::Vec<crate::types::DataLakeConfiguration>>,
43    pub(crate) meta_store_manager_role_arn: ::std::option::Option<::std::string::String>,
44    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
45}
46impl CreateDataLakeInputBuilder {
47    /// Appends an item to `configurations`.
48    ///
49    /// To override the contents of this collection use [`set_configurations`](Self::set_configurations).
50    ///
51    /// <p>Specify the Region or Regions that will contribute data to the rollup region.</p>
52    pub fn configurations(mut self, input: crate::types::DataLakeConfiguration) -> Self {
53        let mut v = self.configurations.unwrap_or_default();
54        v.push(input);
55        self.configurations = ::std::option::Option::Some(v);
56        self
57    }
58    /// <p>Specify the Region or Regions that will contribute data to the rollup region.</p>
59    pub fn set_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataLakeConfiguration>>) -> Self {
60        self.configurations = input;
61        self
62    }
63    /// <p>Specify the Region or Regions that will contribute data to the rollup region.</p>
64    pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataLakeConfiguration>> {
65        &self.configurations
66    }
67    /// <p>The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.</p>
68    /// This field is required.
69    pub fn meta_store_manager_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.meta_store_manager_role_arn = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.</p>
74    pub fn set_meta_store_manager_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.meta_store_manager_role_arn = input;
76        self
77    }
78    /// <p>The Amazon Resource Name (ARN) used to create and update the Glue table. This table contains partitions generated by the ingestion and normalization of Amazon Web Services log sources and custom sources.</p>
79    pub fn get_meta_store_manager_role_arn(&self) -> &::std::option::Option<::std::string::String> {
80        &self.meta_store_manager_role_arn
81    }
82    /// Appends an item to `tags`.
83    ///
84    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
85    ///
86    /// <p>An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string.</p>
87    pub fn tags(mut self, input: crate::types::Tag) -> Self {
88        let mut v = self.tags.unwrap_or_default();
89        v.push(input);
90        self.tags = ::std::option::Option::Some(v);
91        self
92    }
93    /// <p>An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string.</p>
94    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
95        self.tags = input;
96        self
97    }
98    /// <p>An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string.</p>
99    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
100        &self.tags
101    }
102    /// Consumes the builder and constructs a [`CreateDataLakeInput`](crate::operation::create_data_lake::CreateDataLakeInput).
103    pub fn build(
104        self,
105    ) -> ::std::result::Result<crate::operation::create_data_lake::CreateDataLakeInput, ::aws_smithy_types::error::operation::BuildError> {
106        ::std::result::Result::Ok(crate::operation::create_data_lake::CreateDataLakeInput {
107            configurations: self.configurations,
108            meta_store_manager_role_arn: self.meta_store_manager_role_arn,
109            tags: self.tags,
110        })
111    }
112}