aws_sdk_glue/operation/put_attachment/
_put_attachment_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PutAttachmentInput {
6 pub asset_identifier: ::std::option::Option<::std::string::String>,
8 pub iterable_form_name: ::std::option::Option<::std::string::String>,
10 pub item_identifier: ::std::option::Option<::std::string::String>,
12 pub attachment_name: ::std::option::Option<::std::string::String>,
14 pub content: ::std::option::Option<::std::string::String>,
16 pub form_type_id: ::std::option::Option<::std::string::String>,
18 pub client_token: ::std::option::Option<::std::string::String>,
20}
21impl PutAttachmentInput {
22 pub fn asset_identifier(&self) -> ::std::option::Option<&str> {
24 self.asset_identifier.as_deref()
25 }
26 pub fn iterable_form_name(&self) -> ::std::option::Option<&str> {
28 self.iterable_form_name.as_deref()
29 }
30 pub fn item_identifier(&self) -> ::std::option::Option<&str> {
32 self.item_identifier.as_deref()
33 }
34 pub fn attachment_name(&self) -> ::std::option::Option<&str> {
36 self.attachment_name.as_deref()
37 }
38 pub fn content(&self) -> ::std::option::Option<&str> {
40 self.content.as_deref()
41 }
42 pub fn form_type_id(&self) -> ::std::option::Option<&str> {
44 self.form_type_id.as_deref()
45 }
46 pub fn client_token(&self) -> ::std::option::Option<&str> {
48 self.client_token.as_deref()
49 }
50}
51impl PutAttachmentInput {
52 pub fn builder() -> crate::operation::put_attachment::builders::PutAttachmentInputBuilder {
54 crate::operation::put_attachment::builders::PutAttachmentInputBuilder::default()
55 }
56}
57
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct PutAttachmentInputBuilder {
62 pub(crate) asset_identifier: ::std::option::Option<::std::string::String>,
63 pub(crate) iterable_form_name: ::std::option::Option<::std::string::String>,
64 pub(crate) item_identifier: ::std::option::Option<::std::string::String>,
65 pub(crate) attachment_name: ::std::option::Option<::std::string::String>,
66 pub(crate) content: ::std::option::Option<::std::string::String>,
67 pub(crate) form_type_id: ::std::option::Option<::std::string::String>,
68 pub(crate) client_token: ::std::option::Option<::std::string::String>,
69}
70impl PutAttachmentInputBuilder {
71 pub fn asset_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.asset_identifier = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_asset_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.asset_identifier = input;
80 self
81 }
82 pub fn get_asset_identifier(&self) -> &::std::option::Option<::std::string::String> {
84 &self.asset_identifier
85 }
86 pub fn iterable_form_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.iterable_form_name = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_iterable_form_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.iterable_form_name = input;
94 self
95 }
96 pub fn get_iterable_form_name(&self) -> &::std::option::Option<::std::string::String> {
98 &self.iterable_form_name
99 }
100 pub fn item_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.item_identifier = ::std::option::Option::Some(input.into());
103 self
104 }
105 pub fn set_item_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.item_identifier = input;
108 self
109 }
110 pub fn get_item_identifier(&self) -> &::std::option::Option<::std::string::String> {
112 &self.item_identifier
113 }
114 pub fn attachment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.attachment_name = ::std::option::Option::Some(input.into());
118 self
119 }
120 pub fn set_attachment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.attachment_name = input;
123 self
124 }
125 pub fn get_attachment_name(&self) -> &::std::option::Option<::std::string::String> {
127 &self.attachment_name
128 }
129 pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.content = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.content = input;
138 self
139 }
140 pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
142 &self.content
143 }
144 pub fn form_type_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.form_type_id = ::std::option::Option::Some(input.into());
148 self
149 }
150 pub fn set_form_type_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.form_type_id = input;
153 self
154 }
155 pub fn get_form_type_id(&self) -> &::std::option::Option<::std::string::String> {
157 &self.form_type_id
158 }
159 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.client_token = ::std::option::Option::Some(input.into());
162 self
163 }
164 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.client_token = input;
167 self
168 }
169 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
171 &self.client_token
172 }
173 pub fn build(
175 self,
176 ) -> ::std::result::Result<crate::operation::put_attachment::PutAttachmentInput, ::aws_smithy_types::error::operation::BuildError> {
177 ::std::result::Result::Ok(crate::operation::put_attachment::PutAttachmentInput {
178 asset_identifier: self.asset_identifier,
179 iterable_form_name: self.iterable_form_name,
180 item_identifier: self.item_identifier,
181 attachment_name: self.attachment_name,
182 content: self.content,
183 form_type_id: self.form_type_id,
184 client_token: self.client_token,
185 })
186 }
187}