Skip to main content

nominal_api/conjure/objects/attachments/api/
attachment_uri.rs

1/// Pre-signed URI that will download the attachment directly from S3.
2/// Expires if the download has not started in 1 minute.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    PartialEq,
9    Eq,
10    PartialOrd,
11    Ord,
12    Hash
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct AttachmentUri {
18    #[builder(into)]
19    #[serde(rename = "uri")]
20    uri: String,
21}
22impl AttachmentUri {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(uri: impl Into<String>) -> Self {
26        Self::builder().uri(uri).build()
27    }
28    #[inline]
29    pub fn uri(&self) -> &str {
30        &*self.uri
31    }
32}