aws_sdk_glue/types/
_fill_missing_values.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct FillMissingValues {
7 pub name: ::std::string::String,
9 pub inputs: ::std::vec::Vec<::std::string::String>,
11 pub imputed_path: ::std::string::String,
13 pub filled_path: ::std::option::Option<::std::string::String>,
15}
16impl FillMissingValues {
17 pub fn name(&self) -> &str {
19 use std::ops::Deref;
20 self.name.deref()
21 }
22 pub fn inputs(&self) -> &[::std::string::String] {
24 use std::ops::Deref;
25 self.inputs.deref()
26 }
27 pub fn imputed_path(&self) -> &str {
29 use std::ops::Deref;
30 self.imputed_path.deref()
31 }
32 pub fn filled_path(&self) -> ::std::option::Option<&str> {
34 self.filled_path.as_deref()
35 }
36}
37impl FillMissingValues {
38 pub fn builder() -> crate::types::builders::FillMissingValuesBuilder {
40 crate::types::builders::FillMissingValuesBuilder::default()
41 }
42}
43
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct FillMissingValuesBuilder {
48 pub(crate) name: ::std::option::Option<::std::string::String>,
49 pub(crate) inputs: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
50 pub(crate) imputed_path: ::std::option::Option<::std::string::String>,
51 pub(crate) filled_path: ::std::option::Option<::std::string::String>,
52}
53impl FillMissingValuesBuilder {
54 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.name = ::std::option::Option::Some(input.into());
58 self
59 }
60 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.name = input;
63 self
64 }
65 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
67 &self.name
68 }
69 pub fn inputs(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75 let mut v = self.inputs.unwrap_or_default();
76 v.push(input.into());
77 self.inputs = ::std::option::Option::Some(v);
78 self
79 }
80 pub fn set_inputs(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
82 self.inputs = input;
83 self
84 }
85 pub fn get_inputs(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
87 &self.inputs
88 }
89 pub fn imputed_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.imputed_path = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_imputed_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.imputed_path = input;
98 self
99 }
100 pub fn get_imputed_path(&self) -> &::std::option::Option<::std::string::String> {
102 &self.imputed_path
103 }
104 pub fn filled_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106 self.filled_path = ::std::option::Option::Some(input.into());
107 self
108 }
109 pub fn set_filled_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111 self.filled_path = input;
112 self
113 }
114 pub fn get_filled_path(&self) -> &::std::option::Option<::std::string::String> {
116 &self.filled_path
117 }
118 pub fn build(self) -> ::std::result::Result<crate::types::FillMissingValues, ::aws_smithy_types::error::operation::BuildError> {
124 ::std::result::Result::Ok(crate::types::FillMissingValues {
125 name: self.name.ok_or_else(|| {
126 ::aws_smithy_types::error::operation::BuildError::missing_field(
127 "name",
128 "name was not specified but it is required when building FillMissingValues",
129 )
130 })?,
131 inputs: self.inputs.ok_or_else(|| {
132 ::aws_smithy_types::error::operation::BuildError::missing_field(
133 "inputs",
134 "inputs was not specified but it is required when building FillMissingValues",
135 )
136 })?,
137 imputed_path: self.imputed_path.ok_or_else(|| {
138 ::aws_smithy_types::error::operation::BuildError::missing_field(
139 "imputed_path",
140 "imputed_path was not specified but it is required when building FillMissingValues",
141 )
142 })?,
143 filled_path: self.filled_path,
144 })
145 }
146}