use serde::{Serialize, Deserialize};
/**To share the contents of a `File` object with non-Stripe users, you can
create a `FileLink`. `FileLink`s contain a URL that you can use to
retrieve the contents of the file without authentication.*/
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct FileLink {
///Time at which the object was created. Measured in seconds since the Unix epoch.
pub created: i64,
///Returns if the link is already expired.
pub expired: bool,
///Time that the link expires.
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_at: Option<i64>,
///The file object this link points to.
pub file: serde_json::Value,
///Unique identifier for the object.
pub id: String,
///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
pub livemode: bool,
///Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
pub metadata: serde_json::Value,
///String representing the object's type. Objects of the same type share the same value.
pub object: String,
///The publicly accessible URL to download the file.
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl std::fmt::Display for FileLink {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}