aws_sdk_databrew/operation/update_dataset/
_update_dataset_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 UpdateDatasetInput {
6    /// <p>The name of the dataset to be updated.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
9    pub format: ::std::option::Option<crate::types::InputFormat>,
10    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
11    pub format_options: ::std::option::Option<crate::types::FormatOptions>,
12    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
13    pub input: ::std::option::Option<crate::types::Input>,
14    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
15    pub path_options: ::std::option::Option<crate::types::PathOptions>,
16}
17impl UpdateDatasetInput {
18    /// <p>The name of the dataset to be updated.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
23    pub fn format(&self) -> ::std::option::Option<&crate::types::InputFormat> {
24        self.format.as_ref()
25    }
26    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
27    pub fn format_options(&self) -> ::std::option::Option<&crate::types::FormatOptions> {
28        self.format_options.as_ref()
29    }
30    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
31    pub fn input(&self) -> ::std::option::Option<&crate::types::Input> {
32        self.input.as_ref()
33    }
34    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
35    pub fn path_options(&self) -> ::std::option::Option<&crate::types::PathOptions> {
36        self.path_options.as_ref()
37    }
38}
39impl UpdateDatasetInput {
40    /// Creates a new builder-style object to manufacture [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
41    pub fn builder() -> crate::operation::update_dataset::builders::UpdateDatasetInputBuilder {
42        crate::operation::update_dataset::builders::UpdateDatasetInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateDatasetInputBuilder {
50    pub(crate) name: ::std::option::Option<::std::string::String>,
51    pub(crate) format: ::std::option::Option<crate::types::InputFormat>,
52    pub(crate) format_options: ::std::option::Option<crate::types::FormatOptions>,
53    pub(crate) input: ::std::option::Option<crate::types::Input>,
54    pub(crate) path_options: ::std::option::Option<crate::types::PathOptions>,
55}
56impl UpdateDatasetInputBuilder {
57    /// <p>The name of the dataset to be updated.</p>
58    /// This field is required.
59    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The name of the dataset to be updated.</p>
64    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.name = input;
66        self
67    }
68    /// <p>The name of the dataset to be updated.</p>
69    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.name
71    }
72    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
73    pub fn format(mut self, input: crate::types::InputFormat) -> Self {
74        self.format = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
78    pub fn set_format(mut self, input: ::std::option::Option<crate::types::InputFormat>) -> Self {
79        self.format = input;
80        self
81    }
82    /// <p>The file format of a dataset that is created from an Amazon S3 file or folder.</p>
83    pub fn get_format(&self) -> &::std::option::Option<crate::types::InputFormat> {
84        &self.format
85    }
86    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
87    pub fn format_options(mut self, input: crate::types::FormatOptions) -> Self {
88        self.format_options = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
92    pub fn set_format_options(mut self, input: ::std::option::Option<crate::types::FormatOptions>) -> Self {
93        self.format_options = input;
94        self
95    }
96    /// <p>Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.</p>
97    pub fn get_format_options(&self) -> &::std::option::Option<crate::types::FormatOptions> {
98        &self.format_options
99    }
100    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
101    /// This field is required.
102    pub fn input(mut self, input: crate::types::Input) -> Self {
103        self.input = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
107    pub fn set_input(mut self, input: ::std::option::Option<crate::types::Input>) -> Self {
108        self.input = input;
109        self
110    }
111    /// <p>Represents information on how DataBrew can find data, in either the Glue Data Catalog or Amazon S3.</p>
112    pub fn get_input(&self) -> &::std::option::Option<crate::types::Input> {
113        &self.input
114    }
115    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
116    pub fn path_options(mut self, input: crate::types::PathOptions) -> Self {
117        self.path_options = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
121    pub fn set_path_options(mut self, input: ::std::option::Option<crate::types::PathOptions>) -> Self {
122        self.path_options = input;
123        self
124    }
125    /// <p>A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.</p>
126    pub fn get_path_options(&self) -> &::std::option::Option<crate::types::PathOptions> {
127        &self.path_options
128    }
129    /// Consumes the builder and constructs a [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
130    pub fn build(
131        self,
132    ) -> ::std::result::Result<crate::operation::update_dataset::UpdateDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
133        ::std::result::Result::Ok(crate::operation::update_dataset::UpdateDatasetInput {
134            name: self.name,
135            format: self.format,
136            format_options: self.format_options,
137            input: self.input,
138            path_options: self.path_options,
139        })
140    }
141}