Skip to main content

aws_sdk_glue/operation/put_attachment/
_put_attachment_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 PutAttachmentInput {
6    /// <p>The unique identifier of the asset to attach the form to.</p>
7    pub asset_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment targets an item within the iterable form rather than the asset itself.</p>
9    pub iterable_form_name: ::std::option::Option<::std::string::String>,
10    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
11    pub item_identifier: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the attachment.</p>
13    pub attachment_name: ::std::option::Option<::std::string::String>,
14    /// <p>The JSON content of the form, conforming to the schema of the specified form type.</p>
15    pub content: ::std::option::Option<::std::string::String>,
16    /// <p>The identifier of the form type for this attachment.</p>
17    pub form_type_id: ::std::option::Option<::std::string::String>,
18    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
19    pub client_token: ::std::option::Option<::std::string::String>,
20}
21impl PutAttachmentInput {
22    /// <p>The unique identifier of the asset to attach the form to.</p>
23    pub fn asset_identifier(&self) -> ::std::option::Option<&str> {
24        self.asset_identifier.as_deref()
25    }
26    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment targets an item within the iterable form rather than the asset itself.</p>
27    pub fn iterable_form_name(&self) -> ::std::option::Option<&str> {
28        self.iterable_form_name.as_deref()
29    }
30    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
31    pub fn item_identifier(&self) -> ::std::option::Option<&str> {
32        self.item_identifier.as_deref()
33    }
34    /// <p>The name of the attachment.</p>
35    pub fn attachment_name(&self) -> ::std::option::Option<&str> {
36        self.attachment_name.as_deref()
37    }
38    /// <p>The JSON content of the form, conforming to the schema of the specified form type.</p>
39    pub fn content(&self) -> ::std::option::Option<&str> {
40        self.content.as_deref()
41    }
42    /// <p>The identifier of the form type for this attachment.</p>
43    pub fn form_type_id(&self) -> ::std::option::Option<&str> {
44        self.form_type_id.as_deref()
45    }
46    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
47    pub fn client_token(&self) -> ::std::option::Option<&str> {
48        self.client_token.as_deref()
49    }
50}
51impl PutAttachmentInput {
52    /// Creates a new builder-style object to manufacture [`PutAttachmentInput`](crate::operation::put_attachment::PutAttachmentInput).
53    pub fn builder() -> crate::operation::put_attachment::builders::PutAttachmentInputBuilder {
54        crate::operation::put_attachment::builders::PutAttachmentInputBuilder::default()
55    }
56}
57
58/// A builder for [`PutAttachmentInput`](crate::operation::put_attachment::PutAttachmentInput).
59#[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    /// <p>The unique identifier of the asset to attach the form to.</p>
72    /// This field is required.
73    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    /// <p>The unique identifier of the asset to attach the form to.</p>
78    pub fn set_asset_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.asset_identifier = input;
80        self
81    }
82    /// <p>The unique identifier of the asset to attach the form to.</p>
83    pub fn get_asset_identifier(&self) -> &::std::option::Option<::std::string::String> {
84        &self.asset_identifier
85    }
86    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment targets an item within the iterable form rather than the asset itself.</p>
87    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    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment targets an item within the iterable form rather than the asset itself.</p>
92    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    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment targets an item within the iterable form rather than the asset itself.</p>
97    pub fn get_iterable_form_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.iterable_form_name
99    }
100    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
101    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    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
106    pub fn set_item_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.item_identifier = input;
108        self
109    }
110    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
111    pub fn get_item_identifier(&self) -> &::std::option::Option<::std::string::String> {
112        &self.item_identifier
113    }
114    /// <p>The name of the attachment.</p>
115    /// This field is required.
116    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    /// <p>The name of the attachment.</p>
121    pub fn set_attachment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.attachment_name = input;
123        self
124    }
125    /// <p>The name of the attachment.</p>
126    pub fn get_attachment_name(&self) -> &::std::option::Option<::std::string::String> {
127        &self.attachment_name
128    }
129    /// <p>The JSON content of the form, conforming to the schema of the specified form type.</p>
130    /// This field is required.
131    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    /// <p>The JSON content of the form, conforming to the schema of the specified form type.</p>
136    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.content = input;
138        self
139    }
140    /// <p>The JSON content of the form, conforming to the schema of the specified form type.</p>
141    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
142        &self.content
143    }
144    /// <p>The identifier of the form type for this attachment.</p>
145    /// This field is required.
146    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    /// <p>The identifier of the form type for this attachment.</p>
151    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    /// <p>The identifier of the form type for this attachment.</p>
156    pub fn get_form_type_id(&self) -> &::std::option::Option<::std::string::String> {
157        &self.form_type_id
158    }
159    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
160    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    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
165    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.client_token = input;
167        self
168    }
169    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
170    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
171        &self.client_token
172    }
173    /// Consumes the builder and constructs a [`PutAttachmentInput`](crate::operation::put_attachment::PutAttachmentInput).
174    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}