aws_sdk_support/operation/describe_attachment/
_describe_attachment_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The content and file name of the attachment returned by the <code>DescribeAttachment</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeAttachmentOutput {
7    /// <p>This object includes the attachment content and file name.</p>
8    /// <p>In the previous response syntax, the value for the <code>data</code> parameter appears as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
9    pub attachment: ::std::option::Option<crate::types::Attachment>,
10    _request_id: Option<String>,
11}
12impl DescribeAttachmentOutput {
13    /// <p>This object includes the attachment content and file name.</p>
14    /// <p>In the previous response syntax, the value for the <code>data</code> parameter appears as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
15    pub fn attachment(&self) -> ::std::option::Option<&crate::types::Attachment> {
16        self.attachment.as_ref()
17    }
18}
19impl ::aws_types::request_id::RequestId for DescribeAttachmentOutput {
20    fn request_id(&self) -> Option<&str> {
21        self._request_id.as_deref()
22    }
23}
24impl DescribeAttachmentOutput {
25    /// Creates a new builder-style object to manufacture [`DescribeAttachmentOutput`](crate::operation::describe_attachment::DescribeAttachmentOutput).
26    pub fn builder() -> crate::operation::describe_attachment::builders::DescribeAttachmentOutputBuilder {
27        crate::operation::describe_attachment::builders::DescribeAttachmentOutputBuilder::default()
28    }
29}
30
31/// A builder for [`DescribeAttachmentOutput`](crate::operation::describe_attachment::DescribeAttachmentOutput).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct DescribeAttachmentOutputBuilder {
35    pub(crate) attachment: ::std::option::Option<crate::types::Attachment>,
36    _request_id: Option<String>,
37}
38impl DescribeAttachmentOutputBuilder {
39    /// <p>This object includes the attachment content and file name.</p>
40    /// <p>In the previous response syntax, the value for the <code>data</code> parameter appears as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
41    pub fn attachment(mut self, input: crate::types::Attachment) -> Self {
42        self.attachment = ::std::option::Option::Some(input);
43        self
44    }
45    /// <p>This object includes the attachment content and file name.</p>
46    /// <p>In the previous response syntax, the value for the <code>data</code> parameter appears as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
47    pub fn set_attachment(mut self, input: ::std::option::Option<crate::types::Attachment>) -> Self {
48        self.attachment = input;
49        self
50    }
51    /// <p>This object includes the attachment content and file name.</p>
52    /// <p>In the previous response syntax, the value for the <code>data</code> parameter appears as <code>blob</code>, which is represented as a base64-encoded string. The value for <code>fileName</code> is the name of the attachment, such as <code>troubleshoot-screenshot.png</code>.</p>
53    pub fn get_attachment(&self) -> &::std::option::Option<crate::types::Attachment> {
54        &self.attachment
55    }
56    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
57        self._request_id = Some(request_id.into());
58        self
59    }
60
61    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
62        self._request_id = request_id;
63        self
64    }
65    /// Consumes the builder and constructs a [`DescribeAttachmentOutput`](crate::operation::describe_attachment::DescribeAttachmentOutput).
66    pub fn build(self) -> crate::operation::describe_attachment::DescribeAttachmentOutput {
67        crate::operation::describe_attachment::DescribeAttachmentOutput {
68            attachment: self.attachment,
69            _request_id: self._request_id,
70        }
71    }
72}