aws_sdk_connectparticipant/operation/get_attachment/
_get_attachment_input.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAttachmentInput {
    /// <p>A unique identifier for the attachment.</p>
    pub attachment_id: ::std::option::Option<::std::string::String>,
    /// <p>The authentication token associated with the participant's connection.</p>
    pub connection_token: ::std::option::Option<::std::string::String>,
    /// <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>
    pub url_expiry_in_seconds: ::std::option::Option<i32>,
}
impl GetAttachmentInput {
    /// <p>A unique identifier for the attachment.</p>
    pub fn attachment_id(&self) -> ::std::option::Option<&str> {
        self.attachment_id.as_deref()
    }
    /// <p>The authentication token associated with the participant's connection.</p>
    pub fn connection_token(&self) -> ::std::option::Option<&str> {
        self.connection_token.as_deref()
    }
    /// <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>
    pub fn url_expiry_in_seconds(&self) -> ::std::option::Option<i32> {
        self.url_expiry_in_seconds
    }
}
impl GetAttachmentInput {
    /// Creates a new builder-style object to manufacture [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput).
    pub fn builder() -> crate::operation::get_attachment::builders::GetAttachmentInputBuilder {
        crate::operation::get_attachment::builders::GetAttachmentInputBuilder::default()
    }
}

/// A builder for [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAttachmentInputBuilder {
    pub(crate) attachment_id: ::std::option::Option<::std::string::String>,
    pub(crate) connection_token: ::std::option::Option<::std::string::String>,
    pub(crate) url_expiry_in_seconds: ::std::option::Option<i32>,
}
impl GetAttachmentInputBuilder {
    /// <p>A unique identifier for the attachment.</p>
    /// This field is required.
    pub fn attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.attachment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the attachment.</p>
    pub fn set_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.attachment_id = input;
        self
    }
    /// <p>A unique identifier for the attachment.</p>
    pub fn get_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.attachment_id
    }
    /// <p>The authentication token associated with the participant's connection.</p>
    /// This field is required.
    pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The authentication token associated with the participant's connection.</p>
    pub fn set_connection_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_token = input;
        self
    }
    /// <p>The authentication token associated with the participant's connection.</p>
    pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_token
    }
    /// <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>
    pub fn url_expiry_in_seconds(mut self, input: i32) -> Self {
        self.url_expiry_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_url_expiry_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.url_expiry_in_seconds = input;
        self
    }
    /// <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>
    pub fn get_url_expiry_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.url_expiry_in_seconds
    }
    /// Consumes the builder and constructs a [`GetAttachmentInput`](crate::operation::get_attachment::GetAttachmentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_attachment::GetAttachmentInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_attachment::GetAttachmentInput {
            attachment_id: self.attachment_id,
            connection_token: self.connection_token,
            url_expiry_in_seconds: self.url_expiry_in_seconds,
        })
    }
}