aws_sdk_connectparticipant/operation/get_attachment/
_get_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 GetAttachmentInput {
6    /// <p>A unique identifier for the attachment.</p>
7    pub attachment_id: ::std::option::Option<::std::string::String>,
8    /// <p>The authentication token associated with the participant's connection.</p>
9    pub connection_token: ::std::option::Option<::std::string::String>,
10    /// <p>The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
11    pub url_expiry_in_seconds: ::std::option::Option<i32>,
12}
13impl GetAttachmentInput {
14    /// <p>A unique identifier for the attachment.</p>
15    pub fn attachment_id(&self) -> ::std::option::Option<&str> {
16        self.attachment_id.as_deref()
17    }
18    /// <p>The authentication token associated with the participant's connection.</p>
19    pub fn connection_token(&self) -> ::std::option::Option<&str> {
20        self.connection_token.as_deref()
21    }
22    /// <p>The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
23    pub fn url_expiry_in_seconds(&self) -> ::std::option::Option<i32> {
24        self.url_expiry_in_seconds
25    }
26}
27impl GetAttachmentInput {
28    /// Creates a new builder-style object to manufacture [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput).
29    pub fn builder() -> crate::operation::get_attachment::builders::GetAttachmentInputBuilder {
30        crate::operation::get_attachment::builders::GetAttachmentInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetAttachmentInputBuilder {
38    pub(crate) attachment_id: ::std::option::Option<::std::string::String>,
39    pub(crate) connection_token: ::std::option::Option<::std::string::String>,
40    pub(crate) url_expiry_in_seconds: ::std::option::Option<i32>,
41}
42impl GetAttachmentInputBuilder {
43    /// <p>A unique identifier for the attachment.</p>
44    /// This field is required.
45    pub fn attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.attachment_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>A unique identifier for the attachment.</p>
50    pub fn set_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.attachment_id = input;
52        self
53    }
54    /// <p>A unique identifier for the attachment.</p>
55    pub fn get_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.attachment_id
57    }
58    /// <p>The authentication token associated with the participant's connection.</p>
59    /// This field is required.
60    pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.connection_token = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The authentication token associated with the participant's connection.</p>
65    pub fn set_connection_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.connection_token = input;
67        self
68    }
69    /// <p>The authentication token associated with the participant's connection.</p>
70    pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> {
71        &self.connection_token
72    }
73    /// <p>The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
74    pub fn url_expiry_in_seconds(mut self, input: i32) -> Self {
75        self.url_expiry_in_seconds = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
79    pub fn set_url_expiry_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
80        self.url_expiry_in_seconds = input;
81        self
82    }
83    /// <p>The expiration time of the URL in ISO timestamp. It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.</p>
84    pub fn get_url_expiry_in_seconds(&self) -> &::std::option::Option<i32> {
85        &self.url_expiry_in_seconds
86    }
87    /// Consumes the builder and constructs a [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::get_attachment::GetAttachmentInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::get_attachment::GetAttachmentInput {
92            attachment_id: self.attachment_id,
93            connection_token: self.connection_token,
94            url_expiry_in_seconds: self.url_expiry_in_seconds,
95        })
96    }
97}