api models
This commit is contained in:
parent
b007fb36c7
commit
bfcbe1ffa5
43
src/models/access_token.rs
Normal file
43
src/models/access_token.rs
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct AccessToken {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "token", skip_serializing_if = "Option::is_none")]
|
||||
pub token: Option<String>,
|
||||
#[serde(rename = "expires")]
|
||||
pub expires: String,
|
||||
#[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
|
||||
pub scope: Option<String>,
|
||||
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
||||
pub created: Option<String>,
|
||||
#[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
|
||||
pub updated: Option<String>,
|
||||
}
|
||||
|
||||
impl AccessToken {
|
||||
pub fn new(expires: String) -> AccessToken {
|
||||
AccessToken {
|
||||
id: None,
|
||||
token: None,
|
||||
expires,
|
||||
scope: None,
|
||||
created: None,
|
||||
updated: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/auth_token.rs
Normal file
34
src/models/auth_token.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct AuthToken {
|
||||
#[serde(rename = "username")]
|
||||
pub username: String,
|
||||
#[serde(rename = "password")]
|
||||
pub password: String,
|
||||
#[serde(rename = "token", skip_serializing_if = "Option::is_none")]
|
||||
pub token: Option<String>,
|
||||
}
|
||||
|
||||
impl AuthToken {
|
||||
pub fn new(username: String, password: String) -> AuthToken {
|
||||
AuthToken {
|
||||
username,
|
||||
password,
|
||||
token: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
68
src/models/automation.rs
Normal file
68
src/models/automation.rs
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Automation {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: RHashType,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "param_1", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub param_1: Option<Option<String>>,
|
||||
#[serde(rename = "param_2", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub param_2: Option<Option<String>>,
|
||||
#[serde(rename = "param_3", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub param_3: Option<Option<String>>,
|
||||
#[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
|
||||
pub disabled: Option<bool>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
}
|
||||
|
||||
impl Automation {
|
||||
pub fn new(r#type: RHashType) -> Automation {
|
||||
Automation {
|
||||
id: None,
|
||||
r#type,
|
||||
name: None,
|
||||
description: None,
|
||||
param_1: None,
|
||||
param_2: None,
|
||||
param_3: None,
|
||||
disabled: None,
|
||||
created_by: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum RHashType {
|
||||
#[serde(rename = "FOOD_ALIAS")]
|
||||
FoodAlias,
|
||||
#[serde(rename = "UNIT_ALIAS")]
|
||||
UnitAlias,
|
||||
#[serde(rename = "KEYWORD_ALIAS")]
|
||||
KeywordAlias,
|
||||
}
|
||||
|
||||
impl Default for RHashType {
|
||||
fn default() -> RHashType {
|
||||
Self::FoodAlias
|
||||
}
|
||||
}
|
||||
|
40
src/models/bookmarklet_import.rs
Normal file
40
src/models/bookmarklet_import.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct BookmarkletImport {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub url: Option<Option<String>>,
|
||||
#[serde(rename = "html")]
|
||||
pub html: String,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl BookmarkletImport {
|
||||
pub fn new(html: String) -> BookmarkletImport {
|
||||
BookmarkletImport {
|
||||
id: None,
|
||||
url: None,
|
||||
html,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/bookmarklet_import_list.rs
Normal file
37
src/models/bookmarklet_import_list.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct BookmarkletImportList {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub url: Option<Option<String>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl BookmarkletImportList {
|
||||
pub fn new() -> BookmarkletImportList {
|
||||
BookmarkletImportList {
|
||||
id: None,
|
||||
url: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
43
src/models/cook_log.rs
Normal file
43
src/models/cook_log.rs
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct CookLog {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "recipe")]
|
||||
pub recipe: i32,
|
||||
#[serde(rename = "servings", skip_serializing_if = "Option::is_none")]
|
||||
pub servings: Option<i32>,
|
||||
#[serde(rename = "rating", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rating: Option<Option<i32>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl CookLog {
|
||||
pub fn new(recipe: i32) -> CookLog {
|
||||
CookLog {
|
||||
id: None,
|
||||
recipe,
|
||||
servings: None,
|
||||
rating: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
40
src/models/custom_filter.rs
Normal file
40
src/models/custom_filter.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct CustomFilter {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "search")]
|
||||
pub search: String,
|
||||
#[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
|
||||
pub shared: Option<Vec<crate::models::CustomFilterSharedInner>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
}
|
||||
|
||||
impl CustomFilter {
|
||||
pub fn new(name: String, search: String) -> CustomFilter {
|
||||
CustomFilter {
|
||||
id: None,
|
||||
name,
|
||||
search,
|
||||
shared: None,
|
||||
created_by: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
41
src/models/custom_filter_shared_inner.rs
Normal file
41
src/models/custom_filter_shared_inner.rs
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct CustomFilterSharedInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
/// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
|
||||
pub username: Option<String>,
|
||||
#[serde(rename = "first_name", skip_serializing_if = "Option::is_none")]
|
||||
pub first_name: Option<String>,
|
||||
#[serde(rename = "last_name", skip_serializing_if = "Option::is_none")]
|
||||
pub last_name: Option<String>,
|
||||
#[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<String>,
|
||||
}
|
||||
|
||||
impl CustomFilterSharedInner {
|
||||
pub fn new() -> CustomFilterSharedInner {
|
||||
CustomFilterSharedInner {
|
||||
id: None,
|
||||
username: None,
|
||||
first_name: None,
|
||||
last_name: None,
|
||||
display_name: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/export_log.rs
Normal file
55
src/models/export_log.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ExportLog {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: String,
|
||||
#[serde(rename = "msg", skip_serializing_if = "Option::is_none")]
|
||||
pub msg: Option<String>,
|
||||
#[serde(rename = "running", skip_serializing_if = "Option::is_none")]
|
||||
pub running: Option<bool>,
|
||||
#[serde(rename = "total_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub total_recipes: Option<i32>,
|
||||
#[serde(rename = "exported_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub exported_recipes: Option<i32>,
|
||||
#[serde(rename = "cache_duration", skip_serializing_if = "Option::is_none")]
|
||||
pub cache_duration: Option<i32>,
|
||||
#[serde(rename = "possibly_not_expired", skip_serializing_if = "Option::is_none")]
|
||||
pub possibly_not_expired: Option<bool>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl ExportLog {
|
||||
pub fn new(r#type: String) -> ExportLog {
|
||||
ExportLog {
|
||||
id: None,
|
||||
r#type,
|
||||
msg: None,
|
||||
running: None,
|
||||
total_recipes: None,
|
||||
exported_recipes: None,
|
||||
cache_duration: None,
|
||||
possibly_not_expired: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
76
src/models/food.rs
Normal file
76
src/models/food.rs
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Food {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "shopping", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping: Option<String>,
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<Box<crate::models::FoodRecipe>>>,
|
||||
#[serde(rename = "food_onhand", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub food_onhand: Option<Option<String>>,
|
||||
#[serde(rename = "supermarket_category", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub supermarket_category: Option<Option<Box<crate::models::FoodSupermarketCategory>>>,
|
||||
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
||||
pub parent: Option<String>,
|
||||
#[serde(rename = "numchild", skip_serializing_if = "Option::is_none")]
|
||||
pub numchild: Option<i32>,
|
||||
#[serde(rename = "inherit_fields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub inherit_fields: Option<Option<Vec<crate::models::FoodInheritFieldsInner>>>,
|
||||
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
||||
pub full_name: Option<String>,
|
||||
#[serde(rename = "ignore_shopping", skip_serializing_if = "Option::is_none")]
|
||||
pub ignore_shopping: Option<bool>,
|
||||
#[serde(rename = "substitute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute: Option<Option<Vec<crate::models::FoodSubstituteInner>>>,
|
||||
#[serde(rename = "substitute_siblings", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_siblings: Option<bool>,
|
||||
#[serde(rename = "substitute_children", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_children: Option<bool>,
|
||||
#[serde(rename = "substitute_onhand", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_onhand: Option<String>,
|
||||
#[serde(rename = "child_inherit_fields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub child_inherit_fields: Option<Option<Vec<crate::models::FoodInheritFieldsInner>>>,
|
||||
}
|
||||
|
||||
impl Food {
|
||||
pub fn new(name: String) -> Food {
|
||||
Food {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
shopping: None,
|
||||
recipe: None,
|
||||
food_onhand: None,
|
||||
supermarket_category: None,
|
||||
parent: None,
|
||||
numchild: None,
|
||||
inherit_fields: None,
|
||||
full_name: None,
|
||||
ignore_shopping: None,
|
||||
substitute: None,
|
||||
substitute_siblings: None,
|
||||
substitute_children: None,
|
||||
substitute_onhand: None,
|
||||
child_inherit_fields: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/food_inherit_field.rs
Normal file
34
src/models/food_inherit_field.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FoodInheritField {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "field", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub field: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl FoodInheritField {
|
||||
pub fn new() -> FoodInheritField {
|
||||
FoodInheritField {
|
||||
id: None,
|
||||
name: None,
|
||||
field: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/food_inherit_fields_inner.rs
Normal file
34
src/models/food_inherit_fields_inner.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FoodInheritFieldsInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<Option<String>>,
|
||||
#[serde(rename = "field", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub field: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl FoodInheritFieldsInner {
|
||||
pub fn new() -> FoodInheritFieldsInner {
|
||||
FoodInheritFieldsInner {
|
||||
id: None,
|
||||
name: None,
|
||||
field: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/food_recipe.rs
Normal file
34
src/models/food_recipe.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FoodRecipe {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
|
||||
pub url: Option<String>,
|
||||
}
|
||||
|
||||
impl FoodRecipe {
|
||||
pub fn new(name: String) -> FoodRecipe {
|
||||
FoodRecipe {
|
||||
id: None,
|
||||
name,
|
||||
url: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
52
src/models/food_shopping_update.rs
Normal file
52
src/models/food_shopping_update.rs
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FoodShoppingUpdate {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
/// Amount of food to add to the shopping list
|
||||
#[serde(rename = "amount", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub amount: Option<Option<i32>>,
|
||||
/// ID of unit to use for the shopping list
|
||||
#[serde(rename = "unit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub unit: Option<Option<i32>>,
|
||||
/// When set to true will delete all food from active shopping lists.
|
||||
#[serde(rename = "delete", deserialize_with = "Option::deserialize")]
|
||||
pub delete: Option<Delete>,
|
||||
}
|
||||
|
||||
impl FoodShoppingUpdate {
|
||||
pub fn new(delete: Option<Delete>) -> FoodShoppingUpdate {
|
||||
FoodShoppingUpdate {
|
||||
id: None,
|
||||
amount: None,
|
||||
unit: None,
|
||||
delete,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// When set to true will delete all food from active shopping lists.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum Delete {
|
||||
#[serde(rename = "true")]
|
||||
True,
|
||||
}
|
||||
|
||||
impl Default for Delete {
|
||||
fn default() -> Delete {
|
||||
Self::True
|
||||
}
|
||||
}
|
||||
|
31
src/models/food_substitute_inner.rs
Normal file
31
src/models/food_substitute_inner.rs
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FoodSubstituteInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl FoodSubstituteInner {
|
||||
pub fn new(name: String) -> FoodSubstituteInner {
|
||||
FoodSubstituteInner {
|
||||
id: None,
|
||||
name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/food_supermarket_category.rs
Normal file
34
src/models/food_supermarket_category.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct FoodSupermarketCategory {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl FoodSupermarketCategory {
|
||||
pub fn new(name: String) -> FoodSupermarketCategory {
|
||||
FoodSupermarketCategory {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
31
src/models/group.rs
Normal file
31
src/models/group.rs
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Group {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl Group {
|
||||
pub fn new(name: String) -> Group {
|
||||
Group {
|
||||
id: None,
|
||||
name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
52
src/models/import_log.rs
Normal file
52
src/models/import_log.rs
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ImportLog {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "type")]
|
||||
pub r#type: String,
|
||||
#[serde(rename = "msg", skip_serializing_if = "Option::is_none")]
|
||||
pub msg: Option<String>,
|
||||
#[serde(rename = "running", skip_serializing_if = "Option::is_none")]
|
||||
pub running: Option<bool>,
|
||||
#[serde(rename = "keyword", skip_serializing_if = "Option::is_none")]
|
||||
pub keyword: Option<Box<crate::models::ImportLogKeyword>>,
|
||||
#[serde(rename = "total_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub total_recipes: Option<i32>,
|
||||
#[serde(rename = "imported_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub imported_recipes: Option<i32>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl ImportLog {
|
||||
pub fn new(r#type: String) -> ImportLog {
|
||||
ImportLog {
|
||||
id: None,
|
||||
r#type,
|
||||
msg: None,
|
||||
running: None,
|
||||
keyword: None,
|
||||
total_recipes: None,
|
||||
imported_recipes: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/import_log_keyword.rs
Normal file
55
src/models/import_log_keyword.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ImportLogKeyword {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<Option<String>>,
|
||||
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
|
||||
pub label: Option<String>,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
||||
pub parent: Option<String>,
|
||||
#[serde(rename = "numchild", skip_serializing_if = "Option::is_none")]
|
||||
pub numchild: Option<i32>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
||||
pub full_name: Option<String>,
|
||||
}
|
||||
|
||||
impl ImportLogKeyword {
|
||||
pub fn new(name: String) -> ImportLogKeyword {
|
||||
ImportLogKeyword {
|
||||
id: None,
|
||||
name,
|
||||
icon: None,
|
||||
label: None,
|
||||
description: None,
|
||||
parent: None,
|
||||
numchild: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
full_name: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/ingredient.rs
Normal file
55
src/models/ingredient.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Ingredient {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "food", deserialize_with = "Option::deserialize")]
|
||||
pub food: Option<Box<crate::models::IngredientFood>>,
|
||||
#[serde(rename = "unit", deserialize_with = "Option::deserialize")]
|
||||
pub unit: Option<Box<crate::models::FoodSupermarketCategory>>,
|
||||
#[serde(rename = "amount")]
|
||||
pub amount: String,
|
||||
#[serde(rename = "note", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub note: Option<Option<String>>,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "is_header", skip_serializing_if = "Option::is_none")]
|
||||
pub is_header: Option<bool>,
|
||||
#[serde(rename = "no_amount", skip_serializing_if = "Option::is_none")]
|
||||
pub no_amount: Option<bool>,
|
||||
#[serde(rename = "original_text", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub original_text: Option<Option<String>>,
|
||||
#[serde(rename = "used_in_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub used_in_recipes: Option<String>,
|
||||
}
|
||||
|
||||
impl Ingredient {
|
||||
pub fn new(food: Option<crate::models::IngredientFood>, unit: Option<crate::models::FoodSupermarketCategory>, amount: String) -> Ingredient {
|
||||
Ingredient {
|
||||
id: None,
|
||||
food: if let Some(x) = food {Some(Box::new(x))} else {None},
|
||||
unit: if let Some(x) = unit {Some(Box::new(x))} else {None},
|
||||
amount,
|
||||
note: None,
|
||||
order: None,
|
||||
is_header: None,
|
||||
no_amount: None,
|
||||
original_text: None,
|
||||
used_in_recipes: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
76
src/models/ingredient_food.rs
Normal file
76
src/models/ingredient_food.rs
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct IngredientFood {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "shopping", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping: Option<String>,
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<Box<crate::models::FoodRecipe>>>,
|
||||
#[serde(rename = "food_onhand", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub food_onhand: Option<Option<String>>,
|
||||
#[serde(rename = "supermarket_category", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub supermarket_category: Option<Option<Box<crate::models::FoodSupermarketCategory>>>,
|
||||
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
||||
pub parent: Option<String>,
|
||||
#[serde(rename = "numchild", skip_serializing_if = "Option::is_none")]
|
||||
pub numchild: Option<i32>,
|
||||
#[serde(rename = "inherit_fields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub inherit_fields: Option<Option<Vec<crate::models::FoodInheritFieldsInner>>>,
|
||||
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
||||
pub full_name: Option<String>,
|
||||
#[serde(rename = "ignore_shopping", skip_serializing_if = "Option::is_none")]
|
||||
pub ignore_shopping: Option<bool>,
|
||||
#[serde(rename = "substitute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute: Option<Option<Vec<crate::models::FoodSubstituteInner>>>,
|
||||
#[serde(rename = "substitute_siblings", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_siblings: Option<bool>,
|
||||
#[serde(rename = "substitute_children", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_children: Option<bool>,
|
||||
#[serde(rename = "substitute_onhand", skip_serializing_if = "Option::is_none")]
|
||||
pub substitute_onhand: Option<String>,
|
||||
#[serde(rename = "child_inherit_fields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub child_inherit_fields: Option<Option<Vec<crate::models::FoodInheritFieldsInner>>>,
|
||||
}
|
||||
|
||||
impl IngredientFood {
|
||||
pub fn new(name: String) -> IngredientFood {
|
||||
IngredientFood {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
shopping: None,
|
||||
recipe: None,
|
||||
food_onhand: None,
|
||||
supermarket_category: None,
|
||||
parent: None,
|
||||
numchild: None,
|
||||
inherit_fields: None,
|
||||
full_name: None,
|
||||
ignore_shopping: None,
|
||||
substitute: None,
|
||||
substitute_siblings: None,
|
||||
substitute_children: None,
|
||||
substitute_onhand: None,
|
||||
child_inherit_fields: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
52
src/models/invite_link.rs
Normal file
52
src/models/invite_link.rs
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InviteLink {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
||||
pub uuid: Option<uuid::Uuid>,
|
||||
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
|
||||
pub email: Option<String>,
|
||||
#[serde(rename = "group")]
|
||||
pub group: Box<crate::models::InviteLinkGroup>,
|
||||
#[serde(rename = "valid_until", skip_serializing_if = "Option::is_none")]
|
||||
pub valid_until: Option<String>,
|
||||
#[serde(rename = "used_by", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub used_by: Option<Option<i32>>,
|
||||
#[serde(rename = "reusable", skip_serializing_if = "Option::is_none")]
|
||||
pub reusable: Option<bool>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl InviteLink {
|
||||
pub fn new(group: crate::models::InviteLinkGroup) -> InviteLink {
|
||||
InviteLink {
|
||||
id: None,
|
||||
uuid: None,
|
||||
email: None,
|
||||
group: Box::new(group),
|
||||
valid_until: None,
|
||||
used_by: None,
|
||||
reusable: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
31
src/models/invite_link_group.rs
Normal file
31
src/models/invite_link_group.rs
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct InviteLinkGroup {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl InviteLinkGroup {
|
||||
pub fn new(name: String) -> InviteLinkGroup {
|
||||
InviteLinkGroup {
|
||||
id: None,
|
||||
name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/keyword.rs
Normal file
55
src/models/keyword.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Keyword {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<Option<String>>,
|
||||
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
|
||||
pub label: Option<String>,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
||||
pub parent: Option<String>,
|
||||
#[serde(rename = "numchild", skip_serializing_if = "Option::is_none")]
|
||||
pub numchild: Option<i32>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
||||
pub full_name: Option<String>,
|
||||
}
|
||||
|
||||
impl Keyword {
|
||||
pub fn new(name: String) -> Keyword {
|
||||
Keyword {
|
||||
id: None,
|
||||
name,
|
||||
icon: None,
|
||||
label: None,
|
||||
description: None,
|
||||
parent: None,
|
||||
numchild: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
full_name: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_cook_logs_200_response.rs
Normal file
37
src/models/list_cook_logs_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListCookLogs200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::CookLog>>,
|
||||
}
|
||||
|
||||
impl ListCookLogs200Response {
|
||||
pub fn new() -> ListCookLogs200Response {
|
||||
ListCookLogs200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_export_logs_200_response.rs
Normal file
37
src/models/list_export_logs_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListExportLogs200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::ExportLog>>,
|
||||
}
|
||||
|
||||
impl ListExportLogs200Response {
|
||||
pub fn new() -> ListExportLogs200Response {
|
||||
ListExportLogs200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_foods_200_response.rs
Normal file
37
src/models/list_foods_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListFoods200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::Food>>,
|
||||
}
|
||||
|
||||
impl ListFoods200Response {
|
||||
pub fn new() -> ListFoods200Response {
|
||||
ListFoods200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_import_logs_200_response.rs
Normal file
37
src/models/list_import_logs_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListImportLogs200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::ImportLog>>,
|
||||
}
|
||||
|
||||
impl ListImportLogs200Response {
|
||||
pub fn new() -> ListImportLogs200Response {
|
||||
ListImportLogs200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_ingredients_200_response.rs
Normal file
37
src/models/list_ingredients_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListIngredients200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::Ingredient>>,
|
||||
}
|
||||
|
||||
impl ListIngredients200Response {
|
||||
pub fn new() -> ListIngredients200Response {
|
||||
ListIngredients200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_keywords_200_response.rs
Normal file
37
src/models/list_keywords_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListKeywords200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::Keyword>>,
|
||||
}
|
||||
|
||||
impl ListKeywords200Response {
|
||||
pub fn new() -> ListKeywords200Response {
|
||||
ListKeywords200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_recipes_200_response.rs
Normal file
37
src/models/list_recipes_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListRecipes200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::RecipeOverview>>,
|
||||
}
|
||||
|
||||
impl ListRecipes200Response {
|
||||
pub fn new() -> ListRecipes200Response {
|
||||
ListRecipes200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_steps_200_response.rs
Normal file
37
src/models/list_steps_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListSteps200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::Step>>,
|
||||
}
|
||||
|
||||
impl ListSteps200Response {
|
||||
pub fn new() -> ListSteps200Response {
|
||||
ListSteps200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListSupermarketCategoryRelations200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::SupermarketCategoryRelation>>,
|
||||
}
|
||||
|
||||
impl ListSupermarketCategoryRelations200Response {
|
||||
pub fn new() -> ListSupermarketCategoryRelations200Response {
|
||||
ListSupermarketCategoryRelations200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_sync_logs_200_response.rs
Normal file
37
src/models/list_sync_logs_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListSyncLogs200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::SyncLog>>,
|
||||
}
|
||||
|
||||
impl ListSyncLogs200Response {
|
||||
pub fn new() -> ListSyncLogs200Response {
|
||||
ListSyncLogs200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_units_200_response.rs
Normal file
37
src/models/list_units_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListUnits200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::Unit>>,
|
||||
}
|
||||
|
||||
impl ListUnits200Response {
|
||||
pub fn new() -> ListUnits200Response {
|
||||
ListUnits200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/list_view_logs_200_response.rs
Normal file
37
src/models/list_view_logs_200_response.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ListViewLogs200Response {
|
||||
#[serde(rename = "count", skip_serializing_if = "Option::is_none")]
|
||||
pub count: Option<i32>,
|
||||
#[serde(rename = "next", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub next: Option<Option<String>>,
|
||||
#[serde(rename = "previous", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub previous: Option<Option<String>>,
|
||||
#[serde(rename = "results", skip_serializing_if = "Option::is_none")]
|
||||
pub results: Option<Vec<crate::models::ViewLog>>,
|
||||
}
|
||||
|
||||
impl ListViewLogs200Response {
|
||||
pub fn new() -> ListViewLogs200Response {
|
||||
ListViewLogs200Response {
|
||||
count: None,
|
||||
next: None,
|
||||
previous: None,
|
||||
results: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
64
src/models/meal_plan.rs
Normal file
64
src/models/meal_plan.rs
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct MealPlan {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<Box<crate::models::MealPlanRecipe>>>,
|
||||
#[serde(rename = "servings")]
|
||||
pub servings: String,
|
||||
#[serde(rename = "note", skip_serializing_if = "Option::is_none")]
|
||||
pub note: Option<String>,
|
||||
#[serde(rename = "note_markdown", skip_serializing_if = "Option::is_none")]
|
||||
pub note_markdown: Option<String>,
|
||||
#[serde(rename = "date")]
|
||||
pub date: String,
|
||||
#[serde(rename = "meal_type")]
|
||||
pub meal_type: Box<crate::models::MealPlanMealType>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "shared", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub shared: Option<Option<Vec<crate::models::CustomFilterSharedInner>>>,
|
||||
#[serde(rename = "recipe_name", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_name: Option<String>,
|
||||
#[serde(rename = "meal_type_name", skip_serializing_if = "Option::is_none")]
|
||||
pub meal_type_name: Option<String>,
|
||||
#[serde(rename = "shopping", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping: Option<String>,
|
||||
}
|
||||
|
||||
impl MealPlan {
|
||||
pub fn new(servings: String, date: String, meal_type: crate::models::MealPlanMealType) -> MealPlan {
|
||||
MealPlan {
|
||||
id: None,
|
||||
title: None,
|
||||
recipe: None,
|
||||
servings,
|
||||
note: None,
|
||||
note_markdown: None,
|
||||
date,
|
||||
meal_type: Box::new(meal_type),
|
||||
created_by: None,
|
||||
shared: None,
|
||||
recipe_name: None,
|
||||
meal_type_name: None,
|
||||
shopping: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/meal_plan_meal_type.rs
Normal file
46
src/models/meal_plan_meal_type.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct MealPlanMealType {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<Option<String>>,
|
||||
#[serde(rename = "color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub color: Option<Option<String>>,
|
||||
#[serde(rename = "default", skip_serializing_if = "Option::is_none")]
|
||||
pub default: Option<bool>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
}
|
||||
|
||||
impl MealPlanMealType {
|
||||
pub fn new(name: String) -> MealPlanMealType {
|
||||
MealPlanMealType {
|
||||
id: None,
|
||||
name,
|
||||
order: None,
|
||||
icon: None,
|
||||
color: None,
|
||||
default: None,
|
||||
created_by: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
76
src/models/meal_plan_recipe.rs
Normal file
76
src/models/meal_plan_recipe.rs
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct MealPlanRecipe {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<Option<std::path::PathBuf>>,
|
||||
#[serde(rename = "keywords")]
|
||||
pub keywords: Vec<crate::models::MealPlanRecipeKeywordsInner>,
|
||||
#[serde(rename = "working_time", skip_serializing_if = "Option::is_none")]
|
||||
pub working_time: Option<i32>,
|
||||
#[serde(rename = "waiting_time", skip_serializing_if = "Option::is_none")]
|
||||
pub waiting_time: Option<i32>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "internal", skip_serializing_if = "Option::is_none")]
|
||||
pub internal: Option<bool>,
|
||||
#[serde(rename = "servings", skip_serializing_if = "Option::is_none")]
|
||||
pub servings: Option<i32>,
|
||||
#[serde(rename = "servings_text", skip_serializing_if = "Option::is_none")]
|
||||
pub servings_text: Option<String>,
|
||||
#[serde(rename = "rating", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rating: Option<Option<String>>,
|
||||
#[serde(rename = "last_cooked", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_cooked: Option<Option<String>>,
|
||||
#[serde(rename = "new", skip_serializing_if = "Option::is_none")]
|
||||
pub new: Option<String>,
|
||||
#[serde(rename = "recent", skip_serializing_if = "Option::is_none")]
|
||||
pub recent: Option<String>,
|
||||
}
|
||||
|
||||
impl MealPlanRecipe {
|
||||
pub fn new(name: String, keywords: Vec<crate::models::MealPlanRecipeKeywordsInner>) -> MealPlanRecipe {
|
||||
MealPlanRecipe {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
image: None,
|
||||
keywords,
|
||||
working_time: None,
|
||||
waiting_time: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
internal: None,
|
||||
servings: None,
|
||||
servings_text: None,
|
||||
rating: None,
|
||||
last_cooked: None,
|
||||
new: None,
|
||||
recent: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
31
src/models/meal_plan_recipe_keywords_inner.rs
Normal file
31
src/models/meal_plan_recipe_keywords_inner.rs
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct MealPlanRecipeKeywordsInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
|
||||
pub label: Option<String>,
|
||||
}
|
||||
|
||||
impl MealPlanRecipeKeywordsInner {
|
||||
pub fn new() -> MealPlanRecipeKeywordsInner {
|
||||
MealPlanRecipeKeywordsInner {
|
||||
id: None,
|
||||
label: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/meal_type.rs
Normal file
46
src/models/meal_type.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct MealType {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<Option<String>>,
|
||||
#[serde(rename = "color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub color: Option<Option<String>>,
|
||||
#[serde(rename = "default", skip_serializing_if = "Option::is_none")]
|
||||
pub default: Option<bool>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
}
|
||||
|
||||
impl MealType {
|
||||
pub fn new(name: String) -> MealType {
|
||||
MealType {
|
||||
id: None,
|
||||
name,
|
||||
order: None,
|
||||
icon: None,
|
||||
color: None,
|
||||
default: None,
|
||||
created_by: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
156
src/models/mod.rs
Normal file
156
src/models/mod.rs
Normal file
@ -0,0 +1,156 @@
|
||||
pub mod access_token;
|
||||
pub use self::access_token::AccessToken;
|
||||
pub mod auth_token;
|
||||
pub use self::auth_token::AuthToken;
|
||||
pub mod automation;
|
||||
pub use self::automation::Automation;
|
||||
pub mod bookmarklet_import;
|
||||
pub use self::bookmarklet_import::BookmarkletImport;
|
||||
pub mod bookmarklet_import_list;
|
||||
pub use self::bookmarklet_import_list::BookmarkletImportList;
|
||||
pub mod cook_log;
|
||||
pub use self::cook_log::CookLog;
|
||||
pub mod custom_filter;
|
||||
pub use self::custom_filter::CustomFilter;
|
||||
pub mod custom_filter_shared_inner;
|
||||
pub use self::custom_filter_shared_inner::CustomFilterSharedInner;
|
||||
pub mod export_log;
|
||||
pub use self::export_log::ExportLog;
|
||||
pub mod food;
|
||||
pub use self::food::Food;
|
||||
pub mod food_inherit_field;
|
||||
pub use self::food_inherit_field::FoodInheritField;
|
||||
pub mod food_inherit_fields_inner;
|
||||
pub use self::food_inherit_fields_inner::FoodInheritFieldsInner;
|
||||
pub mod food_recipe;
|
||||
pub use self::food_recipe::FoodRecipe;
|
||||
pub mod food_shopping_update;
|
||||
pub use self::food_shopping_update::FoodShoppingUpdate;
|
||||
pub mod food_substitute_inner;
|
||||
pub use self::food_substitute_inner::FoodSubstituteInner;
|
||||
pub mod food_supermarket_category;
|
||||
pub use self::food_supermarket_category::FoodSupermarketCategory;
|
||||
pub mod group;
|
||||
pub use self::group::Group;
|
||||
pub mod import_log;
|
||||
pub use self::import_log::ImportLog;
|
||||
pub mod import_log_keyword;
|
||||
pub use self::import_log_keyword::ImportLogKeyword;
|
||||
pub mod ingredient;
|
||||
pub use self::ingredient::Ingredient;
|
||||
pub mod ingredient_food;
|
||||
pub use self::ingredient_food::IngredientFood;
|
||||
pub mod invite_link;
|
||||
pub use self::invite_link::InviteLink;
|
||||
pub mod invite_link_group;
|
||||
pub use self::invite_link_group::InviteLinkGroup;
|
||||
pub mod keyword;
|
||||
pub use self::keyword::Keyword;
|
||||
pub mod list_cook_logs_200_response;
|
||||
pub use self::list_cook_logs_200_response::ListCookLogs200Response;
|
||||
pub mod list_export_logs_200_response;
|
||||
pub use self::list_export_logs_200_response::ListExportLogs200Response;
|
||||
pub mod list_foods_200_response;
|
||||
pub use self::list_foods_200_response::ListFoods200Response;
|
||||
pub mod list_import_logs_200_response;
|
||||
pub use self::list_import_logs_200_response::ListImportLogs200Response;
|
||||
pub mod list_ingredients_200_response;
|
||||
pub use self::list_ingredients_200_response::ListIngredients200Response;
|
||||
pub mod list_keywords_200_response;
|
||||
pub use self::list_keywords_200_response::ListKeywords200Response;
|
||||
pub mod list_recipes_200_response;
|
||||
pub use self::list_recipes_200_response::ListRecipes200Response;
|
||||
pub mod list_steps_200_response;
|
||||
pub use self::list_steps_200_response::ListSteps200Response;
|
||||
pub mod list_supermarket_category_relations_200_response;
|
||||
pub use self::list_supermarket_category_relations_200_response::ListSupermarketCategoryRelations200Response;
|
||||
pub mod list_sync_logs_200_response;
|
||||
pub use self::list_sync_logs_200_response::ListSyncLogs200Response;
|
||||
pub mod list_units_200_response;
|
||||
pub use self::list_units_200_response::ListUnits200Response;
|
||||
pub mod list_view_logs_200_response;
|
||||
pub use self::list_view_logs_200_response::ListViewLogs200Response;
|
||||
pub mod meal_plan;
|
||||
pub use self::meal_plan::MealPlan;
|
||||
pub mod meal_plan_meal_type;
|
||||
pub use self::meal_plan_meal_type::MealPlanMealType;
|
||||
pub mod meal_plan_recipe;
|
||||
pub use self::meal_plan_recipe::MealPlanRecipe;
|
||||
pub mod meal_plan_recipe_keywords_inner;
|
||||
pub use self::meal_plan_recipe_keywords_inner::MealPlanRecipeKeywordsInner;
|
||||
pub mod meal_type;
|
||||
pub use self::meal_type::MealType;
|
||||
pub mod recipe;
|
||||
pub use self::recipe::Recipe;
|
||||
pub mod recipe_book;
|
||||
pub use self::recipe_book::RecipeBook;
|
||||
pub mod recipe_book_entry;
|
||||
pub use self::recipe_book_entry::RecipeBookEntry;
|
||||
pub mod recipe_book_filter;
|
||||
pub use self::recipe_book_filter::RecipeBookFilter;
|
||||
pub mod recipe_image;
|
||||
pub use self::recipe_image::RecipeImage;
|
||||
pub mod recipe_keywords_inner;
|
||||
pub use self::recipe_keywords_inner::RecipeKeywordsInner;
|
||||
pub mod recipe_nutrition;
|
||||
pub use self::recipe_nutrition::RecipeNutrition;
|
||||
pub mod recipe_overview;
|
||||
pub use self::recipe_overview::RecipeOverview;
|
||||
pub mod recipe_shopping_update;
|
||||
pub use self::recipe_shopping_update::RecipeShoppingUpdate;
|
||||
pub mod recipe_simple;
|
||||
pub use self::recipe_simple::RecipeSimple;
|
||||
pub mod recipe_steps_inner;
|
||||
pub use self::recipe_steps_inner::RecipeStepsInner;
|
||||
pub mod recipe_steps_inner_file;
|
||||
pub use self::recipe_steps_inner_file::RecipeStepsInnerFile;
|
||||
pub mod recipe_steps_inner_ingredients_inner;
|
||||
pub use self::recipe_steps_inner_ingredients_inner::RecipeStepsInnerIngredientsInner;
|
||||
pub mod shopping_list;
|
||||
pub use self::shopping_list::ShoppingList;
|
||||
pub mod shopping_list_entries_inner;
|
||||
pub use self::shopping_list_entries_inner::ShoppingListEntriesInner;
|
||||
pub mod shopping_list_entries_inner_created_by;
|
||||
pub use self::shopping_list_entries_inner_created_by::ShoppingListEntriesInnerCreatedBy;
|
||||
pub mod shopping_list_entries_inner_recipe_mealplan;
|
||||
pub use self::shopping_list_entries_inner_recipe_mealplan::ShoppingListEntriesInnerRecipeMealplan;
|
||||
pub mod shopping_list_entry;
|
||||
pub use self::shopping_list_entry::ShoppingListEntry;
|
||||
pub mod shopping_list_recipe;
|
||||
pub use self::shopping_list_recipe::ShoppingListRecipe;
|
||||
pub mod shopping_list_recipes_inner;
|
||||
pub use self::shopping_list_recipes_inner::ShoppingListRecipesInner;
|
||||
pub mod shopping_list_supermarket;
|
||||
pub use self::shopping_list_supermarket::ShoppingListSupermarket;
|
||||
pub mod shopping_list_supermarket_category_to_supermarket_inner;
|
||||
pub use self::shopping_list_supermarket_category_to_supermarket_inner::ShoppingListSupermarketCategoryToSupermarketInner;
|
||||
pub mod shopping_list_supermarket_category_to_supermarket_inner_category;
|
||||
pub use self::shopping_list_supermarket_category_to_supermarket_inner_category::ShoppingListSupermarketCategoryToSupermarketInnerCategory;
|
||||
pub mod space;
|
||||
pub use self::space::Space;
|
||||
pub mod step;
|
||||
pub use self::step::Step;
|
||||
pub mod storage;
|
||||
pub use self::storage::Storage;
|
||||
pub mod supermarket;
|
||||
pub use self::supermarket::Supermarket;
|
||||
pub mod supermarket_category;
|
||||
pub use self::supermarket_category::SupermarketCategory;
|
||||
pub mod supermarket_category_relation;
|
||||
pub use self::supermarket_category_relation::SupermarketCategoryRelation;
|
||||
pub mod sync;
|
||||
pub use self::sync::Sync;
|
||||
pub mod sync_log;
|
||||
pub use self::sync_log::SyncLog;
|
||||
pub mod unit;
|
||||
pub use self::unit::Unit;
|
||||
pub mod user;
|
||||
pub use self::user::User;
|
||||
pub mod user_file;
|
||||
pub use self::user_file::UserFile;
|
||||
pub mod user_preference;
|
||||
pub use self::user_preference::UserPreference;
|
||||
pub mod user_space;
|
||||
pub use self::user_space::UserSpace;
|
||||
pub mod view_log;
|
||||
pub use self::view_log::ViewLog;
|
91
src/models/recipe.rs
Normal file
91
src/models/recipe.rs
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Recipe {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<Option<std::path::PathBuf>>,
|
||||
#[serde(rename = "keywords")]
|
||||
pub keywords: Vec<crate::models::RecipeKeywordsInner>,
|
||||
#[serde(rename = "steps")]
|
||||
pub steps: Vec<crate::models::RecipeStepsInner>,
|
||||
#[serde(rename = "working_time", skip_serializing_if = "Option::is_none")]
|
||||
pub working_time: Option<i32>,
|
||||
#[serde(rename = "waiting_time", skip_serializing_if = "Option::is_none")]
|
||||
pub waiting_time: Option<i32>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "source_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub source_url: Option<Option<String>>,
|
||||
#[serde(rename = "internal", skip_serializing_if = "Option::is_none")]
|
||||
pub internal: Option<bool>,
|
||||
#[serde(rename = "show_ingredient_overview", skip_serializing_if = "Option::is_none")]
|
||||
pub show_ingredient_overview: Option<bool>,
|
||||
#[serde(rename = "nutrition", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub nutrition: Option<Option<Box<crate::models::RecipeNutrition>>>,
|
||||
#[serde(rename = "servings", skip_serializing_if = "Option::is_none")]
|
||||
pub servings: Option<i32>,
|
||||
#[serde(rename = "file_path", skip_serializing_if = "Option::is_none")]
|
||||
pub file_path: Option<String>,
|
||||
#[serde(rename = "servings_text", skip_serializing_if = "Option::is_none")]
|
||||
pub servings_text: Option<String>,
|
||||
#[serde(rename = "rating", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rating: Option<Option<String>>,
|
||||
#[serde(rename = "last_cooked", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_cooked: Option<Option<String>>,
|
||||
#[serde(rename = "private", skip_serializing_if = "Option::is_none")]
|
||||
pub private: Option<bool>,
|
||||
#[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
|
||||
pub shared: Option<Vec<crate::models::CustomFilterSharedInner>>,
|
||||
}
|
||||
|
||||
impl Recipe {
|
||||
pub fn new(name: String, keywords: Vec<crate::models::RecipeKeywordsInner>, steps: Vec<crate::models::RecipeStepsInner>) -> Recipe {
|
||||
Recipe {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
image: None,
|
||||
keywords,
|
||||
steps,
|
||||
working_time: None,
|
||||
waiting_time: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
source_url: None,
|
||||
internal: None,
|
||||
show_ingredient_overview: None,
|
||||
nutrition: None,
|
||||
servings: None,
|
||||
file_path: None,
|
||||
servings_text: None,
|
||||
rating: None,
|
||||
last_cooked: None,
|
||||
private: None,
|
||||
shared: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/recipe_book.rs
Normal file
46
src/models/recipe_book.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeBook {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<Option<String>>,
|
||||
#[serde(rename = "shared")]
|
||||
pub shared: Vec<crate::models::CustomFilterSharedInner>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "filter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub filter: Option<Option<Box<crate::models::RecipeBookFilter>>>,
|
||||
}
|
||||
|
||||
impl RecipeBook {
|
||||
pub fn new(name: String, shared: Vec<crate::models::CustomFilterSharedInner>) -> RecipeBook {
|
||||
RecipeBook {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
icon: None,
|
||||
shared,
|
||||
created_by: None,
|
||||
filter: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
40
src/models/recipe_book_entry.rs
Normal file
40
src/models/recipe_book_entry.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeBookEntry {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "book")]
|
||||
pub book: i32,
|
||||
#[serde(rename = "book_content", skip_serializing_if = "Option::is_none")]
|
||||
pub book_content: Option<String>,
|
||||
#[serde(rename = "recipe")]
|
||||
pub recipe: i32,
|
||||
#[serde(rename = "recipe_content", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_content: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeBookEntry {
|
||||
pub fn new(book: i32, recipe: i32) -> RecipeBookEntry {
|
||||
RecipeBookEntry {
|
||||
id: None,
|
||||
book,
|
||||
book_content: None,
|
||||
recipe,
|
||||
recipe_content: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
40
src/models/recipe_book_filter.rs
Normal file
40
src/models/recipe_book_filter.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeBookFilter {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "search")]
|
||||
pub search: String,
|
||||
#[serde(rename = "shared", skip_serializing_if = "Option::is_none")]
|
||||
pub shared: Option<Vec<crate::models::CustomFilterSharedInner>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeBookFilter {
|
||||
pub fn new(name: String, search: String) -> RecipeBookFilter {
|
||||
RecipeBookFilter {
|
||||
id: None,
|
||||
name,
|
||||
search,
|
||||
shared: None,
|
||||
created_by: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
31
src/models/recipe_image.rs
Normal file
31
src/models/recipe_image.rs
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeImage {
|
||||
#[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<Option<std::path::PathBuf>>,
|
||||
#[serde(rename = "image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image_url: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl RecipeImage {
|
||||
pub fn new() -> RecipeImage {
|
||||
RecipeImage {
|
||||
image: None,
|
||||
image_url: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/recipe_keywords_inner.rs
Normal file
55
src/models/recipe_keywords_inner.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeKeywordsInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub icon: Option<Option<String>>,
|
||||
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
|
||||
pub label: Option<String>,
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
||||
pub parent: Option<String>,
|
||||
#[serde(rename = "numchild", skip_serializing_if = "Option::is_none")]
|
||||
pub numchild: Option<i32>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
||||
pub full_name: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeKeywordsInner {
|
||||
pub fn new(name: String) -> RecipeKeywordsInner {
|
||||
RecipeKeywordsInner {
|
||||
id: None,
|
||||
name,
|
||||
icon: None,
|
||||
label: None,
|
||||
description: None,
|
||||
parent: None,
|
||||
numchild: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
full_name: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
43
src/models/recipe_nutrition.rs
Normal file
43
src/models/recipe_nutrition.rs
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeNutrition {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "carbohydrates")]
|
||||
pub carbohydrates: String,
|
||||
#[serde(rename = "fats")]
|
||||
pub fats: String,
|
||||
#[serde(rename = "proteins")]
|
||||
pub proteins: String,
|
||||
#[serde(rename = "calories")]
|
||||
pub calories: String,
|
||||
#[serde(rename = "source", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub source: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl RecipeNutrition {
|
||||
pub fn new(carbohydrates: String, fats: String, proteins: String, calories: String) -> RecipeNutrition {
|
||||
RecipeNutrition {
|
||||
id: None,
|
||||
carbohydrates,
|
||||
fats,
|
||||
proteins,
|
||||
calories,
|
||||
source: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
76
src/models/recipe_overview.rs
Normal file
76
src/models/recipe_overview.rs
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeOverview {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<Option<std::path::PathBuf>>,
|
||||
#[serde(rename = "keywords")]
|
||||
pub keywords: Vec<crate::models::MealPlanRecipeKeywordsInner>,
|
||||
#[serde(rename = "working_time", skip_serializing_if = "Option::is_none")]
|
||||
pub working_time: Option<i32>,
|
||||
#[serde(rename = "waiting_time", skip_serializing_if = "Option::is_none")]
|
||||
pub waiting_time: Option<i32>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
#[serde(rename = "internal", skip_serializing_if = "Option::is_none")]
|
||||
pub internal: Option<bool>,
|
||||
#[serde(rename = "servings", skip_serializing_if = "Option::is_none")]
|
||||
pub servings: Option<i32>,
|
||||
#[serde(rename = "servings_text", skip_serializing_if = "Option::is_none")]
|
||||
pub servings_text: Option<String>,
|
||||
#[serde(rename = "rating", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub rating: Option<Option<String>>,
|
||||
#[serde(rename = "last_cooked", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_cooked: Option<Option<String>>,
|
||||
#[serde(rename = "new", skip_serializing_if = "Option::is_none")]
|
||||
pub new: Option<String>,
|
||||
#[serde(rename = "recent", skip_serializing_if = "Option::is_none")]
|
||||
pub recent: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeOverview {
|
||||
pub fn new(name: String, keywords: Vec<crate::models::MealPlanRecipeKeywordsInner>) -> RecipeOverview {
|
||||
RecipeOverview {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
image: None,
|
||||
keywords,
|
||||
working_time: None,
|
||||
waiting_time: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
internal: None,
|
||||
servings: None,
|
||||
servings_text: None,
|
||||
rating: None,
|
||||
last_cooked: None,
|
||||
new: None,
|
||||
recent: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
40
src/models/recipe_shopping_update.rs
Normal file
40
src/models/recipe_shopping_update.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeShoppingUpdate {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
/// Existing shopping list to update
|
||||
#[serde(rename = "list_recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub list_recipe: Option<Option<i32>>,
|
||||
/// List of ingredient IDs from the recipe to add, if not provided all ingredients will be added.
|
||||
#[serde(rename = "ingredients", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredients: Option<Option<i32>>,
|
||||
/// Providing a list_recipe ID and servings of 0 will delete that shopping list.
|
||||
#[serde(rename = "servings", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub servings: Option<Option<i32>>,
|
||||
}
|
||||
|
||||
impl RecipeShoppingUpdate {
|
||||
pub fn new() -> RecipeShoppingUpdate {
|
||||
RecipeShoppingUpdate {
|
||||
id: None,
|
||||
list_recipe: None,
|
||||
ingredients: None,
|
||||
servings: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/recipe_simple.rs
Normal file
34
src/models/recipe_simple.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeSimple {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
|
||||
pub url: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeSimple {
|
||||
pub fn new(name: String) -> RecipeSimple {
|
||||
RecipeSimple {
|
||||
id: None,
|
||||
name,
|
||||
url: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
64
src/models/recipe_steps_inner.rs
Normal file
64
src/models/recipe_steps_inner.rs
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeStepsInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "instruction", skip_serializing_if = "Option::is_none")]
|
||||
pub instruction: Option<String>,
|
||||
#[serde(rename = "ingredients")]
|
||||
pub ingredients: Vec<crate::models::RecipeStepsInnerIngredientsInner>,
|
||||
#[serde(rename = "ingredients_markdown", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredients_markdown: Option<String>,
|
||||
#[serde(rename = "ingredients_vue", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredients_vue: Option<String>,
|
||||
#[serde(rename = "time", skip_serializing_if = "Option::is_none")]
|
||||
pub time: Option<i32>,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "show_as_header", skip_serializing_if = "Option::is_none")]
|
||||
pub show_as_header: Option<bool>,
|
||||
#[serde(rename = "file", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub file: Option<Option<Box<crate::models::RecipeStepsInnerFile>>>,
|
||||
#[serde(rename = "step_recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub step_recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "step_recipe_data", skip_serializing_if = "Option::is_none")]
|
||||
pub step_recipe_data: Option<String>,
|
||||
#[serde(rename = "numrecipe", skip_serializing_if = "Option::is_none")]
|
||||
pub numrecipe: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeStepsInner {
|
||||
pub fn new(ingredients: Vec<crate::models::RecipeStepsInnerIngredientsInner>) -> RecipeStepsInner {
|
||||
RecipeStepsInner {
|
||||
id: None,
|
||||
name: None,
|
||||
instruction: None,
|
||||
ingredients,
|
||||
ingredients_markdown: None,
|
||||
ingredients_vue: None,
|
||||
time: None,
|
||||
order: None,
|
||||
show_as_header: None,
|
||||
file: None,
|
||||
step_recipe: None,
|
||||
step_recipe_data: None,
|
||||
numrecipe: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/recipe_steps_inner_file.rs
Normal file
37
src/models/recipe_steps_inner_file.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeStepsInnerFile {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "file_download", skip_serializing_if = "Option::is_none")]
|
||||
pub file_download: Option<String>,
|
||||
#[serde(rename = "preview", skip_serializing_if = "Option::is_none")]
|
||||
pub preview: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeStepsInnerFile {
|
||||
pub fn new(name: String) -> RecipeStepsInnerFile {
|
||||
RecipeStepsInnerFile {
|
||||
id: None,
|
||||
name,
|
||||
file_download: None,
|
||||
preview: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/recipe_steps_inner_ingredients_inner.rs
Normal file
55
src/models/recipe_steps_inner_ingredients_inner.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct RecipeStepsInnerIngredientsInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "food", deserialize_with = "Option::deserialize")]
|
||||
pub food: Option<Box<crate::models::IngredientFood>>,
|
||||
#[serde(rename = "unit", deserialize_with = "Option::deserialize")]
|
||||
pub unit: Option<Box<crate::models::FoodSupermarketCategory>>,
|
||||
#[serde(rename = "amount")]
|
||||
pub amount: String,
|
||||
#[serde(rename = "note", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub note: Option<Option<String>>,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "is_header", skip_serializing_if = "Option::is_none")]
|
||||
pub is_header: Option<bool>,
|
||||
#[serde(rename = "no_amount", skip_serializing_if = "Option::is_none")]
|
||||
pub no_amount: Option<bool>,
|
||||
#[serde(rename = "original_text", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub original_text: Option<Option<String>>,
|
||||
#[serde(rename = "used_in_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub used_in_recipes: Option<String>,
|
||||
}
|
||||
|
||||
impl RecipeStepsInnerIngredientsInner {
|
||||
pub fn new(food: Option<crate::models::IngredientFood>, unit: Option<crate::models::FoodSupermarketCategory>, amount: String) -> RecipeStepsInnerIngredientsInner {
|
||||
RecipeStepsInnerIngredientsInner {
|
||||
id: None,
|
||||
food: if let Some(x) = food {Some(Box::new(x))} else {None},
|
||||
unit: if let Some(x) = unit {Some(Box::new(x))} else {None},
|
||||
amount,
|
||||
note: None,
|
||||
order: None,
|
||||
is_header: None,
|
||||
no_amount: None,
|
||||
original_text: None,
|
||||
used_in_recipes: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
55
src/models/shopping_list.rs
Normal file
55
src/models/shopping_list.rs
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingList {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
||||
pub uuid: Option<uuid::Uuid>,
|
||||
#[serde(rename = "note", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub note: Option<Option<String>>,
|
||||
#[serde(rename = "recipes", deserialize_with = "Option::deserialize")]
|
||||
pub recipes: Option<Vec<crate::models::ShoppingListRecipesInner>>,
|
||||
#[serde(rename = "entries", deserialize_with = "Option::deserialize")]
|
||||
pub entries: Option<Vec<crate::models::ShoppingListEntriesInner>>,
|
||||
#[serde(rename = "shared")]
|
||||
pub shared: Vec<crate::models::CustomFilterSharedInner>,
|
||||
#[serde(rename = "finished", skip_serializing_if = "Option::is_none")]
|
||||
pub finished: Option<bool>,
|
||||
#[serde(rename = "supermarket", deserialize_with = "Option::deserialize")]
|
||||
pub supermarket: Option<Box<crate::models::ShoppingListSupermarket>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl ShoppingList {
|
||||
pub fn new(recipes: Option<Vec<crate::models::ShoppingListRecipesInner>>, entries: Option<Vec<crate::models::ShoppingListEntriesInner>>, shared: Vec<crate::models::CustomFilterSharedInner>, supermarket: Option<crate::models::ShoppingListSupermarket>) -> ShoppingList {
|
||||
ShoppingList {
|
||||
id: None,
|
||||
uuid: None,
|
||||
note: None,
|
||||
recipes,
|
||||
entries,
|
||||
shared,
|
||||
finished: None,
|
||||
supermarket: if let Some(x) = supermarket {Some(Box::new(x))} else {None},
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
67
src/models/shopping_list_entries_inner.rs
Normal file
67
src/models/shopping_list_entries_inner.rs
Normal file
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListEntriesInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "list_recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub list_recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "food", deserialize_with = "Option::deserialize")]
|
||||
pub food: Option<Box<crate::models::IngredientFood>>,
|
||||
#[serde(rename = "unit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub unit: Option<Option<Box<crate::models::FoodSupermarketCategory>>>,
|
||||
#[serde(rename = "ingredient", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredient: Option<Option<i32>>,
|
||||
#[serde(rename = "ingredient_note", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredient_note: Option<String>,
|
||||
#[serde(rename = "amount")]
|
||||
pub amount: String,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "checked", skip_serializing_if = "Option::is_none")]
|
||||
pub checked: Option<bool>,
|
||||
#[serde(rename = "recipe_mealplan", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_mealplan: Option<Box<crate::models::ShoppingListEntriesInnerRecipeMealplan>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<Box<crate::models::ShoppingListEntriesInnerCreatedBy>>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "completed_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub completed_at: Option<Option<String>>,
|
||||
#[serde(rename = "delay_until", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub delay_until: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl ShoppingListEntriesInner {
|
||||
pub fn new(food: Option<crate::models::IngredientFood>, amount: String) -> ShoppingListEntriesInner {
|
||||
ShoppingListEntriesInner {
|
||||
id: None,
|
||||
list_recipe: None,
|
||||
food: if let Some(x) = food {Some(Box::new(x))} else {None},
|
||||
unit: None,
|
||||
ingredient: None,
|
||||
ingredient_note: None,
|
||||
amount,
|
||||
order: None,
|
||||
checked: None,
|
||||
recipe_mealplan: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
completed_at: None,
|
||||
delay_until: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
41
src/models/shopping_list_entries_inner_created_by.rs
Normal file
41
src/models/shopping_list_entries_inner_created_by.rs
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListEntriesInnerCreatedBy {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
/// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
|
||||
pub username: Option<String>,
|
||||
#[serde(rename = "first_name", skip_serializing_if = "Option::is_none")]
|
||||
pub first_name: Option<String>,
|
||||
#[serde(rename = "last_name", skip_serializing_if = "Option::is_none")]
|
||||
pub last_name: Option<String>,
|
||||
#[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<String>,
|
||||
}
|
||||
|
||||
impl ShoppingListEntriesInnerCreatedBy {
|
||||
pub fn new() -> ShoppingListEntriesInnerCreatedBy {
|
||||
ShoppingListEntriesInnerCreatedBy {
|
||||
id: None,
|
||||
username: None,
|
||||
first_name: None,
|
||||
last_name: None,
|
||||
display_name: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/shopping_list_entries_inner_recipe_mealplan.rs
Normal file
46
src/models/shopping_list_entries_inner_recipe_mealplan.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListEntriesInnerRecipeMealplan {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "recipe_name", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_name: Option<String>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "mealplan", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan: Option<Option<i32>>,
|
||||
#[serde(rename = "servings")]
|
||||
pub servings: String,
|
||||
#[serde(rename = "mealplan_note", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_note: Option<String>,
|
||||
}
|
||||
|
||||
impl ShoppingListEntriesInnerRecipeMealplan {
|
||||
pub fn new(servings: String) -> ShoppingListEntriesInnerRecipeMealplan {
|
||||
ShoppingListEntriesInnerRecipeMealplan {
|
||||
id: None,
|
||||
recipe_name: None,
|
||||
name: None,
|
||||
recipe: None,
|
||||
mealplan: None,
|
||||
servings,
|
||||
mealplan_note: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
67
src/models/shopping_list_entry.rs
Normal file
67
src/models/shopping_list_entry.rs
Normal file
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListEntry {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "list_recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub list_recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "food", deserialize_with = "Option::deserialize")]
|
||||
pub food: Option<Box<crate::models::IngredientFood>>,
|
||||
#[serde(rename = "unit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub unit: Option<Option<Box<crate::models::FoodSupermarketCategory>>>,
|
||||
#[serde(rename = "ingredient", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredient: Option<Option<i32>>,
|
||||
#[serde(rename = "ingredient_note", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredient_note: Option<String>,
|
||||
#[serde(rename = "amount")]
|
||||
pub amount: String,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "checked", skip_serializing_if = "Option::is_none")]
|
||||
pub checked: Option<bool>,
|
||||
#[serde(rename = "recipe_mealplan", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_mealplan: Option<Box<crate::models::ShoppingListEntriesInnerRecipeMealplan>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<Box<crate::models::ShoppingListEntriesInnerCreatedBy>>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "completed_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub completed_at: Option<Option<String>>,
|
||||
#[serde(rename = "delay_until", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub delay_until: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl ShoppingListEntry {
|
||||
pub fn new(food: Option<crate::models::IngredientFood>, amount: String) -> ShoppingListEntry {
|
||||
ShoppingListEntry {
|
||||
id: None,
|
||||
list_recipe: None,
|
||||
food: if let Some(x) = food {Some(Box::new(x))} else {None},
|
||||
unit: None,
|
||||
ingredient: None,
|
||||
ingredient_note: None,
|
||||
amount,
|
||||
order: None,
|
||||
checked: None,
|
||||
recipe_mealplan: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
completed_at: None,
|
||||
delay_until: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/shopping_list_recipe.rs
Normal file
46
src/models/shopping_list_recipe.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListRecipe {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "recipe_name", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_name: Option<String>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "mealplan", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan: Option<Option<i32>>,
|
||||
#[serde(rename = "servings")]
|
||||
pub servings: String,
|
||||
#[serde(rename = "mealplan_note", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_note: Option<String>,
|
||||
}
|
||||
|
||||
impl ShoppingListRecipe {
|
||||
pub fn new(servings: String) -> ShoppingListRecipe {
|
||||
ShoppingListRecipe {
|
||||
id: None,
|
||||
recipe_name: None,
|
||||
name: None,
|
||||
recipe: None,
|
||||
mealplan: None,
|
||||
servings,
|
||||
mealplan_note: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/shopping_list_recipes_inner.rs
Normal file
46
src/models/shopping_list_recipes_inner.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListRecipesInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "recipe_name", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_name: Option<String>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "mealplan", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan: Option<Option<i32>>,
|
||||
#[serde(rename = "servings")]
|
||||
pub servings: String,
|
||||
#[serde(rename = "mealplan_note", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_note: Option<String>,
|
||||
}
|
||||
|
||||
impl ShoppingListRecipesInner {
|
||||
pub fn new(servings: String) -> ShoppingListRecipesInner {
|
||||
ShoppingListRecipesInner {
|
||||
id: None,
|
||||
recipe_name: None,
|
||||
name: None,
|
||||
recipe: None,
|
||||
mealplan: None,
|
||||
servings,
|
||||
mealplan_note: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/shopping_list_supermarket.rs
Normal file
37
src/models/shopping_list_supermarket.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListSupermarket {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "category_to_supermarket", skip_serializing_if = "Option::is_none")]
|
||||
pub category_to_supermarket: Option<Vec<crate::models::ShoppingListSupermarketCategoryToSupermarketInner>>,
|
||||
}
|
||||
|
||||
impl ShoppingListSupermarket {
|
||||
pub fn new(name: String) -> ShoppingListSupermarket {
|
||||
ShoppingListSupermarket {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
category_to_supermarket: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListSupermarketCategoryToSupermarketInner {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "category")]
|
||||
pub category: Box<crate::models::ShoppingListSupermarketCategoryToSupermarketInnerCategory>,
|
||||
#[serde(rename = "supermarket")]
|
||||
pub supermarket: i32,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
}
|
||||
|
||||
impl ShoppingListSupermarketCategoryToSupermarketInner {
|
||||
pub fn new(category: crate::models::ShoppingListSupermarketCategoryToSupermarketInnerCategory, supermarket: i32) -> ShoppingListSupermarketCategoryToSupermarketInner {
|
||||
ShoppingListSupermarketCategoryToSupermarketInner {
|
||||
id: None,
|
||||
category: Box::new(category),
|
||||
supermarket,
|
||||
order: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ShoppingListSupermarketCategoryToSupermarketInnerCategory {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl ShoppingListSupermarketCategoryToSupermarketInnerCategory {
|
||||
pub fn new(name: String) -> ShoppingListSupermarketCategoryToSupermarketInnerCategory {
|
||||
ShoppingListSupermarketCategoryToSupermarketInnerCategory {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
74
src/models/space.rs
Normal file
74
src/models/space.rs
Normal file
@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Space {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "created_by", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<Option<String>>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
|
||||
pub message: Option<String>,
|
||||
#[serde(rename = "max_recipes", skip_serializing_if = "Option::is_none")]
|
||||
pub max_recipes: Option<i32>,
|
||||
/// Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.
|
||||
#[serde(rename = "max_file_storage_mb", skip_serializing_if = "Option::is_none")]
|
||||
pub max_file_storage_mb: Option<i32>,
|
||||
#[serde(rename = "max_users", skip_serializing_if = "Option::is_none")]
|
||||
pub max_users: Option<i32>,
|
||||
#[serde(rename = "allow_sharing", skip_serializing_if = "Option::is_none")]
|
||||
pub allow_sharing: Option<bool>,
|
||||
#[serde(rename = "demo", skip_serializing_if = "Option::is_none")]
|
||||
pub demo: Option<bool>,
|
||||
#[serde(rename = "food_inherit")]
|
||||
pub food_inherit: Vec<crate::models::FoodInheritFieldsInner>,
|
||||
#[serde(rename = "show_facet_count", skip_serializing_if = "Option::is_none")]
|
||||
pub show_facet_count: Option<bool>,
|
||||
#[serde(rename = "user_count", skip_serializing_if = "Option::is_none")]
|
||||
pub user_count: Option<String>,
|
||||
#[serde(rename = "recipe_count", skip_serializing_if = "Option::is_none")]
|
||||
pub recipe_count: Option<String>,
|
||||
#[serde(rename = "file_size_mb", skip_serializing_if = "Option::is_none")]
|
||||
pub file_size_mb: Option<String>,
|
||||
#[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<Option<Box<crate::models::RecipeStepsInnerFile>>>,
|
||||
}
|
||||
|
||||
impl Space {
|
||||
pub fn new(food_inherit: Vec<crate::models::FoodInheritFieldsInner>) -> Space {
|
||||
Space {
|
||||
id: None,
|
||||
name: None,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
message: None,
|
||||
max_recipes: None,
|
||||
max_file_storage_mb: None,
|
||||
max_users: None,
|
||||
allow_sharing: None,
|
||||
demo: None,
|
||||
food_inherit,
|
||||
show_facet_count: None,
|
||||
user_count: None,
|
||||
recipe_count: None,
|
||||
file_size_mb: None,
|
||||
image: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
64
src/models/step.rs
Normal file
64
src/models/step.rs
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Step {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
#[serde(rename = "instruction", skip_serializing_if = "Option::is_none")]
|
||||
pub instruction: Option<String>,
|
||||
#[serde(rename = "ingredients")]
|
||||
pub ingredients: Vec<crate::models::RecipeStepsInnerIngredientsInner>,
|
||||
#[serde(rename = "ingredients_markdown", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredients_markdown: Option<String>,
|
||||
#[serde(rename = "ingredients_vue", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredients_vue: Option<String>,
|
||||
#[serde(rename = "time", skip_serializing_if = "Option::is_none")]
|
||||
pub time: Option<i32>,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
#[serde(rename = "show_as_header", skip_serializing_if = "Option::is_none")]
|
||||
pub show_as_header: Option<bool>,
|
||||
#[serde(rename = "file", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub file: Option<Option<Box<crate::models::RecipeStepsInnerFile>>>,
|
||||
#[serde(rename = "step_recipe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub step_recipe: Option<Option<i32>>,
|
||||
#[serde(rename = "step_recipe_data", skip_serializing_if = "Option::is_none")]
|
||||
pub step_recipe_data: Option<String>,
|
||||
#[serde(rename = "numrecipe", skip_serializing_if = "Option::is_none")]
|
||||
pub numrecipe: Option<String>,
|
||||
}
|
||||
|
||||
impl Step {
|
||||
pub fn new(ingredients: Vec<crate::models::RecipeStepsInnerIngredientsInner>) -> Step {
|
||||
Step {
|
||||
id: None,
|
||||
name: None,
|
||||
instruction: None,
|
||||
ingredients,
|
||||
ingredients_markdown: None,
|
||||
ingredients_vue: None,
|
||||
time: None,
|
||||
order: None,
|
||||
show_as_header: None,
|
||||
file: None,
|
||||
step_recipe: None,
|
||||
step_recipe_data: None,
|
||||
numrecipe: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
62
src/models/storage.rs
Normal file
62
src/models/storage.rs
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Storage {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "method", skip_serializing_if = "Option::is_none")]
|
||||
pub method: Option<Method>,
|
||||
#[serde(rename = "username", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub username: Option<Option<String>>,
|
||||
#[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub password: Option<Option<String>>,
|
||||
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub token: Option<Option<String>>,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
}
|
||||
|
||||
impl Storage {
|
||||
pub fn new(name: String) -> Storage {
|
||||
Storage {
|
||||
id: None,
|
||||
name,
|
||||
method: None,
|
||||
username: None,
|
||||
password: None,
|
||||
token: None,
|
||||
created_by: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum Method {
|
||||
#[serde(rename = "DB")]
|
||||
Db,
|
||||
#[serde(rename = "NEXTCLOUD")]
|
||||
Nextcloud,
|
||||
#[serde(rename = "LOCAL")]
|
||||
Local,
|
||||
}
|
||||
|
||||
impl Default for Method {
|
||||
fn default() -> Method {
|
||||
Self::Db
|
||||
}
|
||||
}
|
||||
|
37
src/models/supermarket.rs
Normal file
37
src/models/supermarket.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Supermarket {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
#[serde(rename = "category_to_supermarket", skip_serializing_if = "Option::is_none")]
|
||||
pub category_to_supermarket: Option<Vec<crate::models::ShoppingListSupermarketCategoryToSupermarketInner>>,
|
||||
}
|
||||
|
||||
impl Supermarket {
|
||||
pub fn new(name: String) -> Supermarket {
|
||||
Supermarket {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
category_to_supermarket: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/supermarket_category.rs
Normal file
34
src/models/supermarket_category.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct SupermarketCategory {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl SupermarketCategory {
|
||||
pub fn new(name: String) -> SupermarketCategory {
|
||||
SupermarketCategory {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/supermarket_category_relation.rs
Normal file
37
src/models/supermarket_category_relation.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct SupermarketCategoryRelation {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "category")]
|
||||
pub category: Box<crate::models::ShoppingListSupermarketCategoryToSupermarketInnerCategory>,
|
||||
#[serde(rename = "supermarket")]
|
||||
pub supermarket: i32,
|
||||
#[serde(rename = "order", skip_serializing_if = "Option::is_none")]
|
||||
pub order: Option<i32>,
|
||||
}
|
||||
|
||||
impl SupermarketCategoryRelation {
|
||||
pub fn new(category: crate::models::ShoppingListSupermarketCategoryToSupermarketInnerCategory, supermarket: i32) -> SupermarketCategoryRelation {
|
||||
SupermarketCategoryRelation {
|
||||
id: None,
|
||||
category: Box::new(category),
|
||||
supermarket,
|
||||
order: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
46
src/models/sync.rs
Normal file
46
src/models/sync.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Sync {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "storage")]
|
||||
pub storage: i32,
|
||||
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
|
||||
pub path: Option<String>,
|
||||
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
|
||||
pub active: Option<bool>,
|
||||
#[serde(rename = "last_checked", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub last_checked: Option<Option<String>>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
impl Sync {
|
||||
pub fn new(storage: i32) -> Sync {
|
||||
Sync {
|
||||
id: None,
|
||||
storage,
|
||||
path: None,
|
||||
active: None,
|
||||
last_checked: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
40
src/models/sync_log.rs
Normal file
40
src/models/sync_log.rs
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct SyncLog {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "sync")]
|
||||
pub sync: i32,
|
||||
#[serde(rename = "status")]
|
||||
pub status: String,
|
||||
#[serde(rename = "msg", skip_serializing_if = "Option::is_none")]
|
||||
pub msg: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl SyncLog {
|
||||
pub fn new(sync: i32, status: String) -> SyncLog {
|
||||
SyncLog {
|
||||
id: None,
|
||||
sync,
|
||||
status,
|
||||
msg: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
34
src/models/unit.rs
Normal file
34
src/models/unit.rs
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct Unit {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<Option<String>>,
|
||||
}
|
||||
|
||||
impl Unit {
|
||||
pub fn new(name: String) -> Unit {
|
||||
Unit {
|
||||
id: None,
|
||||
name,
|
||||
description: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
41
src/models/user.rs
Normal file
41
src/models/user.rs
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct User {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
/// Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
|
||||
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
|
||||
pub username: Option<String>,
|
||||
#[serde(rename = "first_name", skip_serializing_if = "Option::is_none")]
|
||||
pub first_name: Option<String>,
|
||||
#[serde(rename = "last_name", skip_serializing_if = "Option::is_none")]
|
||||
pub last_name: Option<String>,
|
||||
#[serde(rename = "display_name", skip_serializing_if = "Option::is_none")]
|
||||
pub display_name: Option<String>,
|
||||
}
|
||||
|
||||
impl User {
|
||||
pub fn new() -> User {
|
||||
User {
|
||||
id: None,
|
||||
username: None,
|
||||
first_name: None,
|
||||
last_name: None,
|
||||
display_name: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
43
src/models/user_file.rs
Normal file
43
src/models/user_file.rs
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct UserFile {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "file")]
|
||||
pub file: std::path::PathBuf,
|
||||
#[serde(rename = "file_download", skip_serializing_if = "Option::is_none")]
|
||||
pub file_download: Option<String>,
|
||||
#[serde(rename = "preview", skip_serializing_if = "Option::is_none")]
|
||||
pub preview: Option<String>,
|
||||
#[serde(rename = "file_size_kb", skip_serializing_if = "Option::is_none")]
|
||||
pub file_size_kb: Option<i32>,
|
||||
}
|
||||
|
||||
impl UserFile {
|
||||
pub fn new(name: String, file: std::path::PathBuf) -> UserFile {
|
||||
UserFile {
|
||||
id: None,
|
||||
name,
|
||||
file,
|
||||
file_download: None,
|
||||
preview: None,
|
||||
file_size_kb: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
165
src/models/user_preference.rs
Normal file
165
src/models/user_preference.rs
Normal file
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct UserPreference {
|
||||
#[serde(rename = "user")]
|
||||
pub user: i32,
|
||||
#[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub image: Option<Option<Box<crate::models::RecipeStepsInnerFile>>>,
|
||||
#[serde(rename = "theme", skip_serializing_if = "Option::is_none")]
|
||||
pub theme: Option<Theme>,
|
||||
#[serde(rename = "nav_color", skip_serializing_if = "Option::is_none")]
|
||||
pub nav_color: Option<NavColor>,
|
||||
#[serde(rename = "default_unit", skip_serializing_if = "Option::is_none")]
|
||||
pub default_unit: Option<String>,
|
||||
#[serde(rename = "default_page", skip_serializing_if = "Option::is_none")]
|
||||
pub default_page: Option<DefaultPage>,
|
||||
#[serde(rename = "use_fractions", skip_serializing_if = "Option::is_none")]
|
||||
pub use_fractions: Option<bool>,
|
||||
#[serde(rename = "use_kj", skip_serializing_if = "Option::is_none")]
|
||||
pub use_kj: Option<bool>,
|
||||
#[serde(rename = "plan_share", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub plan_share: Option<Option<Vec<crate::models::CustomFilterSharedInner>>>,
|
||||
#[serde(rename = "sticky_navbar", skip_serializing_if = "Option::is_none")]
|
||||
pub sticky_navbar: Option<bool>,
|
||||
#[serde(rename = "ingredient_decimals", skip_serializing_if = "Option::is_none")]
|
||||
pub ingredient_decimals: Option<i32>,
|
||||
#[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
|
||||
pub comments: Option<bool>,
|
||||
#[serde(rename = "shopping_auto_sync", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping_auto_sync: Option<i32>,
|
||||
#[serde(rename = "mealplan_autoadd_shopping", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_autoadd_shopping: Option<bool>,
|
||||
#[serde(rename = "food_inherit_default", skip_serializing_if = "Option::is_none")]
|
||||
pub food_inherit_default: Option<String>,
|
||||
#[serde(rename = "default_delay", skip_serializing_if = "Option::is_none")]
|
||||
pub default_delay: Option<String>,
|
||||
#[serde(rename = "mealplan_autoinclude_related", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_autoinclude_related: Option<bool>,
|
||||
#[serde(rename = "mealplan_autoexclude_onhand", skip_serializing_if = "Option::is_none")]
|
||||
pub mealplan_autoexclude_onhand: Option<bool>,
|
||||
#[serde(rename = "shopping_share", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping_share: Option<Option<Vec<crate::models::CustomFilterSharedInner>>>,
|
||||
#[serde(rename = "shopping_recent_days", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping_recent_days: Option<i32>,
|
||||
#[serde(rename = "csv_delim", skip_serializing_if = "Option::is_none")]
|
||||
pub csv_delim: Option<String>,
|
||||
#[serde(rename = "csv_prefix", skip_serializing_if = "Option::is_none")]
|
||||
pub csv_prefix: Option<String>,
|
||||
#[serde(rename = "filter_to_supermarket", skip_serializing_if = "Option::is_none")]
|
||||
pub filter_to_supermarket: Option<bool>,
|
||||
#[serde(rename = "shopping_add_onhand", skip_serializing_if = "Option::is_none")]
|
||||
pub shopping_add_onhand: Option<bool>,
|
||||
#[serde(rename = "left_handed", skip_serializing_if = "Option::is_none")]
|
||||
pub left_handed: Option<bool>,
|
||||
#[serde(rename = "food_children_exist", skip_serializing_if = "Option::is_none")]
|
||||
pub food_children_exist: Option<String>,
|
||||
}
|
||||
|
||||
impl UserPreference {
|
||||
pub fn new(user: i32) -> UserPreference {
|
||||
UserPreference {
|
||||
user,
|
||||
image: None,
|
||||
theme: None,
|
||||
nav_color: None,
|
||||
default_unit: None,
|
||||
default_page: None,
|
||||
use_fractions: None,
|
||||
use_kj: None,
|
||||
plan_share: None,
|
||||
sticky_navbar: None,
|
||||
ingredient_decimals: None,
|
||||
comments: None,
|
||||
shopping_auto_sync: None,
|
||||
mealplan_autoadd_shopping: None,
|
||||
food_inherit_default: None,
|
||||
default_delay: None,
|
||||
mealplan_autoinclude_related: None,
|
||||
mealplan_autoexclude_onhand: None,
|
||||
shopping_share: None,
|
||||
shopping_recent_days: None,
|
||||
csv_delim: None,
|
||||
csv_prefix: None,
|
||||
filter_to_supermarket: None,
|
||||
shopping_add_onhand: None,
|
||||
left_handed: None,
|
||||
food_children_exist: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum Theme {
|
||||
#[serde(rename = "TANDOOR")]
|
||||
Tandoor,
|
||||
#[serde(rename = "BOOTSTRAP")]
|
||||
Bootstrap,
|
||||
#[serde(rename = "DARKLY")]
|
||||
Darkly,
|
||||
#[serde(rename = "FLATLY")]
|
||||
Flatly,
|
||||
#[serde(rename = "SUPERHERO")]
|
||||
Superhero,
|
||||
}
|
||||
|
||||
impl Default for Theme {
|
||||
fn default() -> Theme {
|
||||
Self::Tandoor
|
||||
}
|
||||
}
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum NavColor {
|
||||
#[serde(rename = "PRIMARY")]
|
||||
Primary,
|
||||
#[serde(rename = "SECONDARY")]
|
||||
Secondary,
|
||||
#[serde(rename = "SUCCESS")]
|
||||
Success,
|
||||
#[serde(rename = "INFO")]
|
||||
Info,
|
||||
#[serde(rename = "WARNING")]
|
||||
Warning,
|
||||
#[serde(rename = "DANGER")]
|
||||
Danger,
|
||||
#[serde(rename = "LIGHT")]
|
||||
Light,
|
||||
#[serde(rename = "DARK")]
|
||||
Dark,
|
||||
}
|
||||
|
||||
impl Default for NavColor {
|
||||
fn default() -> NavColor {
|
||||
Self::Primary
|
||||
}
|
||||
}
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum DefaultPage {
|
||||
#[serde(rename = "SEARCH")]
|
||||
Search,
|
||||
#[serde(rename = "PLAN")]
|
||||
Plan,
|
||||
#[serde(rename = "BOOKS")]
|
||||
Books,
|
||||
}
|
||||
|
||||
impl Default for DefaultPage {
|
||||
fn default() -> DefaultPage {
|
||||
Self::Search
|
||||
}
|
||||
}
|
||||
|
46
src/models/user_space.rs
Normal file
46
src/models/user_space.rs
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct UserSpace {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
|
||||
pub user: Option<Box<crate::models::ShoppingListEntriesInnerCreatedBy>>,
|
||||
#[serde(rename = "space", skip_serializing_if = "Option::is_none")]
|
||||
pub space: Option<String>,
|
||||
#[serde(rename = "groups")]
|
||||
pub groups: Vec<crate::models::InviteLinkGroup>,
|
||||
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
|
||||
pub active: Option<bool>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
impl UserSpace {
|
||||
pub fn new(groups: Vec<crate::models::InviteLinkGroup>) -> UserSpace {
|
||||
UserSpace {
|
||||
id: None,
|
||||
user: None,
|
||||
space: None,
|
||||
groups,
|
||||
active: None,
|
||||
created_at: None,
|
||||
updated_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
37
src/models/view_log.rs
Normal file
37
src/models/view_log.rs
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Django Recipes
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.4.5
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct ViewLog {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i32>,
|
||||
#[serde(rename = "recipe")]
|
||||
pub recipe: i32,
|
||||
#[serde(rename = "created_by", skip_serializing_if = "Option::is_none")]
|
||||
pub created_by: Option<String>,
|
||||
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
||||
pub created_at: Option<String>,
|
||||
}
|
||||
|
||||
impl ViewLog {
|
||||
pub fn new(recipe: i32) -> ViewLog {
|
||||
ViewLog {
|
||||
id: None,
|
||||
recipe,
|
||||
created_by: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user