aws_sdk_quicksight/operation/create_ingestion/
_create_ingestion_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 CreateIngestionInput {
6    /// <p>The ID of the dataset used in the ingestion.</p>
7    pub data_set_id: ::std::option::Option<::std::string::String>,
8    /// <p>An ID for the ingestion.</p>
9    pub ingestion_id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Web Services account ID.</p>
11    pub aws_account_id: ::std::option::Option<::std::string::String>,
12    /// <p>The type of ingestion that you want to create.</p>
13    pub ingestion_type: ::std::option::Option<crate::types::IngestionType>,
14}
15impl CreateIngestionInput {
16    /// <p>The ID of the dataset used in the ingestion.</p>
17    pub fn data_set_id(&self) -> ::std::option::Option<&str> {
18        self.data_set_id.as_deref()
19    }
20    /// <p>An ID for the ingestion.</p>
21    pub fn ingestion_id(&self) -> ::std::option::Option<&str> {
22        self.ingestion_id.as_deref()
23    }
24    /// <p>The Amazon Web Services account ID.</p>
25    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
26        self.aws_account_id.as_deref()
27    }
28    /// <p>The type of ingestion that you want to create.</p>
29    pub fn ingestion_type(&self) -> ::std::option::Option<&crate::types::IngestionType> {
30        self.ingestion_type.as_ref()
31    }
32}
33impl CreateIngestionInput {
34    /// Creates a new builder-style object to manufacture [`CreateIngestionInput`](crate::operation::create_ingestion::CreateIngestionInput).
35    pub fn builder() -> crate::operation::create_ingestion::builders::CreateIngestionInputBuilder {
36        crate::operation::create_ingestion::builders::CreateIngestionInputBuilder::default()
37    }
38}
39
40/// A builder for [`CreateIngestionInput`](crate::operation::create_ingestion::CreateIngestionInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct CreateIngestionInputBuilder {
44    pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
45    pub(crate) ingestion_id: ::std::option::Option<::std::string::String>,
46    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
47    pub(crate) ingestion_type: ::std::option::Option<crate::types::IngestionType>,
48}
49impl CreateIngestionInputBuilder {
50    /// <p>The ID of the dataset used in the ingestion.</p>
51    /// This field is required.
52    pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.data_set_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID of the dataset used in the ingestion.</p>
57    pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.data_set_id = input;
59        self
60    }
61    /// <p>The ID of the dataset used in the ingestion.</p>
62    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.data_set_id
64    }
65    /// <p>An ID for the ingestion.</p>
66    /// This field is required.
67    pub fn ingestion_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.ingestion_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>An ID for the ingestion.</p>
72    pub fn set_ingestion_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.ingestion_id = input;
74        self
75    }
76    /// <p>An ID for the ingestion.</p>
77    pub fn get_ingestion_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.ingestion_id
79    }
80    /// <p>The Amazon Web Services account ID.</p>
81    /// This field is required.
82    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.aws_account_id = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The Amazon Web Services account ID.</p>
87    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.aws_account_id = input;
89        self
90    }
91    /// <p>The Amazon Web Services account ID.</p>
92    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
93        &self.aws_account_id
94    }
95    /// <p>The type of ingestion that you want to create.</p>
96    pub fn ingestion_type(mut self, input: crate::types::IngestionType) -> Self {
97        self.ingestion_type = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>The type of ingestion that you want to create.</p>
101    pub fn set_ingestion_type(mut self, input: ::std::option::Option<crate::types::IngestionType>) -> Self {
102        self.ingestion_type = input;
103        self
104    }
105    /// <p>The type of ingestion that you want to create.</p>
106    pub fn get_ingestion_type(&self) -> &::std::option::Option<crate::types::IngestionType> {
107        &self.ingestion_type
108    }
109    /// Consumes the builder and constructs a [`CreateIngestionInput`](crate::operation::create_ingestion::CreateIngestionInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::create_ingestion::CreateIngestionInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::create_ingestion::CreateIngestionInput {
114            data_set_id: self.data_set_id,
115            ingestion_id: self.ingestion_id,
116            aws_account_id: self.aws_account_id,
117            ingestion_type: self.ingestion_type,
118        })
119    }
120}