mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-05-18 09:35:44 +00:00
Release v1.3.0
This commit is contained in:
parent
33d76d7a4e
commit
dfa1dfb1c8
64 changed files with 3285 additions and 1329 deletions
51
src/models/storage_file.rs
Normal file
51
src/models/storage_file.rs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct StorageFile {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<String>,
|
||||
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "content_type", deserialize_with = "Option::deserialize")]
|
||||
pub content_type: Option<String>,
|
||||
#[serde(rename = "url", deserialize_with = "Option::deserialize")]
|
||||
pub url: Option<String>,
|
||||
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
||||
pub size: Option<i64>,
|
||||
#[serde(rename = "hash", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub hash: Option<Option<String>>,
|
||||
#[serde(rename = "etag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub etag: Option<Option<String>>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl StorageFile {
|
||||
pub fn new(name: Option<String>, content_type: Option<String>, url: Option<String>) -> StorageFile {
|
||||
StorageFile {
|
||||
id: None,
|
||||
name,
|
||||
content_type,
|
||||
url,
|
||||
size: None,
|
||||
hash: None,
|
||||
etag: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue