aws_sdk_databrew/operation/update_dataset/
_update_dataset_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateDatasetInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub format: ::std::option::Option<crate::types::InputFormat>,
10 pub format_options: ::std::option::Option<crate::types::FormatOptions>,
12 pub input: ::std::option::Option<crate::types::Input>,
14 pub path_options: ::std::option::Option<crate::types::PathOptions>,
16}
17impl UpdateDatasetInput {
18 pub fn name(&self) -> ::std::option::Option<&str> {
20 self.name.as_deref()
21 }
22 pub fn format(&self) -> ::std::option::Option<&crate::types::InputFormat> {
24 self.format.as_ref()
25 }
26 pub fn format_options(&self) -> ::std::option::Option<&crate::types::FormatOptions> {
28 self.format_options.as_ref()
29 }
30 pub fn input(&self) -> ::std::option::Option<&crate::types::Input> {
32 self.input.as_ref()
33 }
34 pub fn path_options(&self) -> ::std::option::Option<&crate::types::PathOptions> {
36 self.path_options.as_ref()
37 }
38}
39impl UpdateDatasetInput {
40 pub fn builder() -> crate::operation::update_dataset::builders::UpdateDatasetInputBuilder {
42 crate::operation::update_dataset::builders::UpdateDatasetInputBuilder::default()
43 }
44}
45
46#[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 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.name = input;
66 self
67 }
68 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70 &self.name
71 }
72 pub fn format(mut self, input: crate::types::InputFormat) -> Self {
74 self.format = ::std::option::Option::Some(input);
75 self
76 }
77 pub fn set_format(mut self, input: ::std::option::Option<crate::types::InputFormat>) -> Self {
79 self.format = input;
80 self
81 }
82 pub fn get_format(&self) -> &::std::option::Option<crate::types::InputFormat> {
84 &self.format
85 }
86 pub fn format_options(mut self, input: crate::types::FormatOptions) -> Self {
88 self.format_options = ::std::option::Option::Some(input);
89 self
90 }
91 pub fn set_format_options(mut self, input: ::std::option::Option<crate::types::FormatOptions>) -> Self {
93 self.format_options = input;
94 self
95 }
96 pub fn get_format_options(&self) -> &::std::option::Option<crate::types::FormatOptions> {
98 &self.format_options
99 }
100 pub fn input(mut self, input: crate::types::Input) -> Self {
103 self.input = ::std::option::Option::Some(input);
104 self
105 }
106 pub fn set_input(mut self, input: ::std::option::Option<crate::types::Input>) -> Self {
108 self.input = input;
109 self
110 }
111 pub fn get_input(&self) -> &::std::option::Option<crate::types::Input> {
113 &self.input
114 }
115 pub fn path_options(mut self, input: crate::types::PathOptions) -> Self {
117 self.path_options = ::std::option::Option::Some(input);
118 self
119 }
120 pub fn set_path_options(mut self, input: ::std::option::Option<crate::types::PathOptions>) -> Self {
122 self.path_options = input;
123 self
124 }
125 pub fn get_path_options(&self) -> &::std::option::Option<crate::types::PathOptions> {
127 &self.path_options
128 }
129 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}