summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api-spec/src/models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-09 00:05:29 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-09 00:05:29 -0700
commitbf63870c88b5a62a2aad08929465b37d8be474dc (patch)
treeff1b2d78e9cce854563f89ab5828e63fa5f4fb94 /rust/fatcat-api-spec/src/models.rs
parent8888e6ea1af818a0a5dfb7414fa767ae176d092f (diff)
downloadfatcat-bf63870c88b5a62a2aad08929465b37d8be474dc.tar.gz
fatcat-bf63870c88b5a62a2aad08929465b37d8be474dc.zip
rust codegen
Diffstat (limited to 'rust/fatcat-api-spec/src/models.rs')
-rw-r--r--rust/fatcat-api-spec/src/models.rs67
1 files changed, 64 insertions, 3 deletions
diff --git a/rust/fatcat-api-spec/src/models.rs b/rust/fatcat-api-spec/src/models.rs
index f1b657c2..cd418d99 100644
--- a/rust/fatcat-api-spec/src/models.rs
+++ b/rust/fatcat-api-spec/src/models.rs
@@ -706,6 +706,14 @@ pub struct ReleaseContrib {
#[serde(skip_serializing_if = "Option::is_none")]
pub raw_name: Option<String>,
+ #[serde(rename = "given_name")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub given_name: Option<String>,
+
+ #[serde(rename = "surname")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub surname: Option<String>,
+
#[serde(rename = "role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
@@ -727,6 +735,8 @@ impl ReleaseContrib {
creator_id: None,
creator: None,
raw_name: None,
+ given_name: None,
+ surname: None,
role: None,
raw_affiliation: None,
extra: None,
@@ -762,6 +772,14 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub publisher: Option<String>,
+ #[serde(rename = "version")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub version: Option<String>,
+
+ #[serde(rename = "number")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub number: Option<String>,
+
#[serde(rename = "pages")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pages: Option<String>,
@@ -774,6 +792,14 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub volume: Option<String>,
+ #[serde(rename = "mag_id")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub mag_id: Option<String>,
+
+ #[serde(rename = "ark_id")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub ark_id: Option<String>,
+
#[serde(rename = "jstor_id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub jstor_id: Option<String>,
@@ -806,6 +832,18 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub doi: Option<String>,
+ #[serde(rename = "withdrawn_year")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub withdrawn_year: Option<i64>,
+
+ #[serde(rename = "withdrawn_date")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub withdrawn_date: Option<chrono::NaiveDate>,
+
+ #[serde(rename = "withdrawn_state")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub withdrawn_state: Option<String>,
+
#[serde(rename = "release_year")]
#[serde(skip_serializing_if = "Option::is_none")]
pub release_year: Option<i64>,
@@ -814,9 +852,9 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub release_date: Option<chrono::NaiveDate>,
- #[serde(rename = "release_status")]
+ #[serde(rename = "release_stage")]
#[serde(skip_serializing_if = "Option::is_none")]
- pub release_status: Option<String>,
+ pub release_stage: Option<String>,
#[serde(rename = "release_type")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -855,6 +893,11 @@ pub struct ReleaseEntity {
#[serde(skip_serializing_if = "Option::is_none")]
pub original_title: Option<String>,
+ /// Avoid this field if possible, and merge with title; usually English
+ #[serde(rename = "subtitle")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub subtitle: Option<String>,
+
/// Required for valid entities. The title used in citations and for display; usually English
#[serde(rename = "title")]
#[serde(skip_serializing_if = "Option::is_none")]
@@ -898,9 +941,13 @@ impl ReleaseEntity {
license_slug: None,
language: None,
publisher: None,
+ version: None,
+ number: None,
pages: None,
issue: None,
volume: None,
+ mag_id: None,
+ ark_id: None,
jstor_id: None,
arxiv_id: None,
core_id: None,
@@ -909,9 +956,12 @@ impl ReleaseEntity {
isbn13: None,
wikidata_qid: None,
doi: None,
+ withdrawn_year: None,
+ withdrawn_date: None,
+ withdrawn_state: None,
release_year: None,
release_date: None,
- release_status: None,
+ release_stage: None,
release_type: None,
container_id: None,
webcaptures: None,
@@ -920,6 +970,7 @@ impl ReleaseEntity {
container: None,
work_id: None,
original_title: None,
+ subtitle: None,
title: None,
state: None,
ident: None,
@@ -1132,12 +1183,20 @@ pub struct WebcaptureEntityCdx {
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<i64>,
+ #[serde(rename = "size_bytes")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub size_bytes: Option<i64>,
+
#[serde(rename = "sha1")]
pub sha1: String,
#[serde(rename = "sha256")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sha256: Option<String>,
+
+ #[serde(rename = "extra")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub extra: Option<serde_json::Value>,
}
impl WebcaptureEntityCdx {
@@ -1148,8 +1207,10 @@ impl WebcaptureEntityCdx {
url: url,
mimetype: None,
status_code: None,
+ size_bytes: None,
sha1: sha1,
sha256: None,
+ extra: None,
}
}
}