Skip to main content

aws_sdk_glue/operation/delete_attachment/
_delete_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 DeleteAttachmentInput {
6    /// <p>The unique identifier of the asset from which to delete the attachment.</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 is deleted from an item within the iterable form rather than from 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 to delete.</p>
13    pub attachment_name: ::std::option::Option<::std::string::String>,
14}
15impl DeleteAttachmentInput {
16    /// <p>The unique identifier of the asset from which to delete the attachment.</p>
17    pub fn asset_identifier(&self) -> ::std::option::Option<&str> {
18        self.asset_identifier.as_deref()
19    }
20    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment is deleted from an item within the iterable form rather than from the asset itself.</p>
21    pub fn iterable_form_name(&self) -> ::std::option::Option<&str> {
22        self.iterable_form_name.as_deref()
23    }
24    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
25    pub fn item_identifier(&self) -> ::std::option::Option<&str> {
26        self.item_identifier.as_deref()
27    }
28    /// <p>The name of the attachment to delete.</p>
29    pub fn attachment_name(&self) -> ::std::option::Option<&str> {
30        self.attachment_name.as_deref()
31    }
32}
33impl DeleteAttachmentInput {
34    /// Creates a new builder-style object to manufacture [`DeleteAttachmentInput`](crate::operation::delete_attachment::DeleteAttachmentInput).
35    pub fn builder() -> crate::operation::delete_attachment::builders::DeleteAttachmentInputBuilder {
36        crate::operation::delete_attachment::builders::DeleteAttachmentInputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteAttachmentInput`](crate::operation::delete_attachment::DeleteAttachmentInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteAttachmentInputBuilder {
44    pub(crate) asset_identifier: ::std::option::Option<::std::string::String>,
45    pub(crate) iterable_form_name: ::std::option::Option<::std::string::String>,
46    pub(crate) item_identifier: ::std::option::Option<::std::string::String>,
47    pub(crate) attachment_name: ::std::option::Option<::std::string::String>,
48}
49impl DeleteAttachmentInputBuilder {
50    /// <p>The unique identifier of the asset from which to delete the attachment.</p>
51    /// This field is required.
52    pub fn asset_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.asset_identifier = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The unique identifier of the asset from which to delete the attachment.</p>
57    pub fn set_asset_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.asset_identifier = input;
59        self
60    }
61    /// <p>The unique identifier of the asset from which to delete the attachment.</p>
62    pub fn get_asset_identifier(&self) -> &::std::option::Option<::std::string::String> {
63        &self.asset_identifier
64    }
65    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment is deleted from an item within the iterable form rather than from the asset itself.</p>
66    pub fn iterable_form_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.iterable_form_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment is deleted from an item within the iterable form rather than from the asset itself.</p>
71    pub fn set_iterable_form_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.iterable_form_name = input;
73        self
74    }
75    /// <p>The name of the iterable form. When specified along with <code>itemIdentifier</code>, the attachment is deleted from an item within the iterable form rather than from the asset itself.</p>
76    pub fn get_iterable_form_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.iterable_form_name
78    }
79    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
80    pub fn item_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.item_identifier = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
85    pub fn set_item_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.item_identifier = input;
87        self
88    }
89    /// <p>The identifier of the item within the iterable form. Required when <code>iterableFormName</code> is specified.</p>
90    pub fn get_item_identifier(&self) -> &::std::option::Option<::std::string::String> {
91        &self.item_identifier
92    }
93    /// <p>The name of the attachment to delete.</p>
94    /// This field is required.
95    pub fn attachment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.attachment_name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the attachment to delete.</p>
100    pub fn set_attachment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.attachment_name = input;
102        self
103    }
104    /// <p>The name of the attachment to delete.</p>
105    pub fn get_attachment_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.attachment_name
107    }
108    /// Consumes the builder and constructs a [`DeleteAttachmentInput`](crate::operation::delete_attachment::DeleteAttachmentInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::delete_attachment::DeleteAttachmentInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::delete_attachment::DeleteAttachmentInput {
113            asset_identifier: self.asset_identifier,
114            iterable_form_name: self.iterable_form_name,
115            item_identifier: self.item_identifier,
116            attachment_name: self.attachment_name,
117        })
118    }
119}