diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-24 01:31:44 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-24 15:21:32 -0700 |
commit | 63db335123d8dde1c4e701668c07805094ff88e8 (patch) | |
tree | 83f0387b6568d09c525330d414b8e21c21d43e03 /rust/fatcat-api/src/models.rs | |
parent | eb094c1829d1fc9bb48e687921eeff656b69e2c2 (diff) | |
download | fatcat-63db335123d8dde1c4e701668c07805094ff88e8.tar.gz fatcat-63db335123d8dde1c4e701668c07805094ff88e8.zip |
WIP on API spec improvements
Fixes a bunch of i64/i32/isize stuff
Diffstat (limited to 'rust/fatcat-api/src/models.rs')
-rw-r--r-- | rust/fatcat-api/src/models.rs | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs index 784068e3..9609e5ec 100644 --- a/rust/fatcat-api/src/models.rs +++ b/rust/fatcat-api/src/models.rs @@ -72,17 +72,17 @@ impl ::std::ops::DerefMut for Changelogentries { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ChangelogentriesInner { #[serde(rename = "index")] - pub index: isize, + pub index: i64, #[serde(rename = "editgroup_id")] - pub editgroup_id: isize, + pub editgroup_id: i64, #[serde(rename = "timestamp")] pub timestamp: chrono::DateTime<chrono::Utc>, } impl ChangelogentriesInner { - pub fn new(index: isize, editgroup_id: isize, timestamp: chrono::DateTime<chrono::Utc>) -> ChangelogentriesInner { + pub fn new(index: i64, editgroup_id: i64, timestamp: chrono::DateTime<chrono::Utc>) -> ChangelogentriesInner { ChangelogentriesInner { index: index, editgroup_id: editgroup_id, @@ -115,7 +115,7 @@ pub struct ContainerEntity { #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] - pub revision: Option<isize>, + pub revision: Option<i64>, #[serde(rename = "redirect")] #[serde(skip_serializing_if = "Option::is_none")] @@ -123,7 +123,7 @@ pub struct ContainerEntity { #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<isize>, + pub editgroup_id: Option<i64>, } impl ContainerEntity { @@ -152,7 +152,7 @@ pub struct CreatorEntity { #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<isize>, + pub editgroup_id: Option<i64>, #[serde(rename = "redirect")] #[serde(skip_serializing_if = "Option::is_none")] @@ -160,7 +160,7 @@ pub struct CreatorEntity { #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] - pub revision: Option<isize>, + pub revision: Option<i64>, #[serde(rename = "ident")] #[serde(skip_serializing_if = "Option::is_none")] @@ -190,22 +190,32 @@ impl CreatorEntity { pub struct Editgroup { #[serde(rename = "id")] #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option<isize>, + pub id: Option<i64>, #[serde(rename = "editor_id")] - pub editor_id: isize, + pub editor_id: i64, #[serde(rename = "description")] #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<String>, + + #[serde(rename = "container_edits")] + #[serde(skip_serializing_if = "Option::is_none")] + pub container_edits: Option<Vec>, + + #[serde(rename = "extra")] + #[serde(skip_serializing_if = "Option::is_none")] + pub extra: Option<HashMap<String, String>>, } impl Editgroup { - pub fn new(editor_id: isize) -> Editgroup { + pub fn new(editor_id: i64) -> Editgroup { Editgroup { id: None, editor_id: editor_id, description: None, + container_edits: None, + extra: None, } } } @@ -226,11 +236,11 @@ impl Editor { pub struct EntityEdit { #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<isize>, + pub editgroup_id: Option<i64>, #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] - pub revision: Option<isize>, + pub revision: Option<i64>, #[serde(rename = "ident")] #[serde(skip_serializing_if = "Option::is_none")] @@ -238,7 +248,7 @@ pub struct EntityEdit { #[serde(rename = "edit_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub edit_id: Option<isize>, + pub edit_id: Option<i64>, } impl EntityEdit { @@ -276,11 +286,11 @@ pub struct FileEntity { #[serde(rename = "size")] #[serde(skip_serializing_if = "Option::is_none")] - pub size: Option<isize>, + pub size: Option<i64>, #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<isize>, + pub editgroup_id: Option<i64>, #[serde(rename = "redirect")] #[serde(skip_serializing_if = "Option::is_none")] @@ -288,7 +298,7 @@ pub struct FileEntity { #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] - pub revision: Option<isize>, + pub revision: Option<i64>, #[serde(rename = "ident")] #[serde(skip_serializing_if = "Option::is_none")] @@ -358,7 +368,7 @@ pub struct ReleaseEntity { #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] - pub revision: Option<isize>, + pub revision: Option<i64>, #[serde(rename = "redirect")] #[serde(skip_serializing_if = "Option::is_none")] @@ -366,7 +376,7 @@ pub struct ReleaseEntity { #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<isize>, + pub editgroup_id: Option<i64>, } impl ReleaseEntity { @@ -409,7 +419,7 @@ pub struct WorkEntity { #[serde(rename = "editgroup_id")] #[serde(skip_serializing_if = "Option::is_none")] - pub editgroup_id: Option<isize>, + pub editgroup_id: Option<i64>, #[serde(rename = "redirect")] #[serde(skip_serializing_if = "Option::is_none")] @@ -417,7 +427,7 @@ pub struct WorkEntity { #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] - pub revision: Option<isize>, + pub revision: Option<i64>, #[serde(rename = "ident")] #[serde(skip_serializing_if = "Option::is_none")] |