diff options
Diffstat (limited to 'crates')
29 files changed, 181 insertions, 191 deletions
diff --git a/crates/rocie-client/.openapi-generator/FILES b/crates/rocie-client/.openapi-generator/FILES index 82fd640..ee3b706 100644 --- a/crates/rocie-client/.openapi-generator/FILES +++ b/crates/rocie-client/.openapi-generator/FILES @@ -36,9 +36,11 @@ docs/IngredientOneOfRegisteredProduct.md docs/Item.md docs/ItemOneOf.md docs/ItemOneOf1.md +docs/ItemOneOf1Ingredient.md docs/ItemOneOf2.md docs/ItemOneOf3.md docs/ItemOneOf4.md +docs/ItemOneOfText.md docs/LoginInfo.md docs/Metadata.md docs/NameAndUrl.md @@ -50,6 +52,7 @@ docs/ProductParent.md docs/ProductParentId.md docs/ProductParentStub.md docs/ProductStub.md +docs/ProvisionInfo.md docs/Recipe.md docs/RecipeId.md docs/RecipeParent.md @@ -105,9 +108,11 @@ src/models/ingredient_one_of_registered_product.rs src/models/item.rs src/models/item_one_of.rs src/models/item_one_of_1.rs +src/models/item_one_of_1_ingredient.rs src/models/item_one_of_2.rs src/models/item_one_of_3.rs src/models/item_one_of_4.rs +src/models/item_one_of_text.rs src/models/login_info.rs src/models/metadata.rs src/models/mod.rs @@ -120,6 +125,7 @@ src/models/product_parent.rs src/models/product_parent_id.rs src/models/product_parent_stub.rs src/models/product_stub.rs +src/models/provision_info.rs src/models/recipe.rs src/models/recipe_id.rs src/models/recipe_parent.rs diff --git a/crates/rocie-client/README.md b/crates/rocie-client/README.md index fd8ed2b..734c256 100644 --- a/crates/rocie-client/README.md +++ b/crates/rocie-client/README.md @@ -90,9 +90,11 @@ Class | Method | HTTP request | Description - [Item](docs/Item.md) - [ItemOneOf](docs/ItemOneOf.md) - [ItemOneOf1](docs/ItemOneOf1.md) + - [ItemOneOf1Ingredient](docs/ItemOneOf1Ingredient.md) - [ItemOneOf2](docs/ItemOneOf2.md) - [ItemOneOf3](docs/ItemOneOf3.md) - [ItemOneOf4](docs/ItemOneOf4.md) + - [ItemOneOfText](docs/ItemOneOfText.md) - [LoginInfo](docs/LoginInfo.md) - [Metadata](docs/Metadata.md) - [NameAndUrl](docs/NameAndUrl.md) @@ -104,6 +106,7 @@ Class | Method | HTTP request | Description - [ProductParentId](docs/ProductParentId.md) - [ProductParentStub](docs/ProductParentStub.md) - [ProductStub](docs/ProductStub.md) + - [ProvisionInfo](docs/ProvisionInfo.md) - [Recipe](docs/Recipe.md) - [RecipeId](docs/RecipeId.md) - [RecipeParent](docs/RecipeParent.md) diff --git a/crates/rocie-client/docs/ApiSetNoAuthUserApi.md b/crates/rocie-client/docs/ApiSetNoAuthUserApi.md index f532533..9a877d0 100644 --- a/crates/rocie-client/docs/ApiSetNoAuthUserApi.md +++ b/crates/rocie-client/docs/ApiSetNoAuthUserApi.md @@ -65,7 +65,7 @@ No authorization required ## provision -> models::UserId provision(user_stub) +> models::UserId provision(provision_info) Provision this instance. This only works, if no users exist yet. @@ -75,7 +75,7 @@ This only works, if no users exist yet. Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**user_stub** | [**UserStub**](UserStub.md) | | [required] | +**provision_info** | [**ProvisionInfo**](ProvisionInfo.md) | | [required] | ### Return type diff --git a/crates/rocie-client/docs/ContentOneOf.md b/crates/rocie-client/docs/ContentOneOf.md index 61ea868..212daf7 100644 --- a/crates/rocie-client/docs/ContentOneOf.md +++ b/crates/rocie-client/docs/ContentOneOf.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | **String** | | -**value** | [**models::Step**](Step.md) | A step | +**step** | [**models::Step**](Step.md) | A step | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ContentOneOf1.md b/crates/rocie-client/docs/ContentOneOf1.md index eef8337..a351585 100644 --- a/crates/rocie-client/docs/ContentOneOf1.md +++ b/crates/rocie-client/docs/ContentOneOf1.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | **String** | | -**value** | **String** | A paragraph of just text, no instructions | +**text** | **String** | A paragraph of just text, no instructions | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ItemOneOf.md b/crates/rocie-client/docs/ItemOneOf.md index 5009d60..4616a71 100644 --- a/crates/rocie-client/docs/ItemOneOf.md +++ b/crates/rocie-client/docs/ItemOneOf.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | **String** | | -**value** | **String** | | +**text** | [**models::ItemOneOfText**](Item_oneOf_Text.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ItemOneOf1.md b/crates/rocie-client/docs/ItemOneOf1.md index 8160228..70a5640 100644 --- a/crates/rocie-client/docs/ItemOneOf1.md +++ b/crates/rocie-client/docs/ItemOneOf1.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **u32** | | -**r#type** | **String** | | +**ingredient** | [**models::ItemOneOf1Ingredient**](Item_oneOf_1_Ingredient.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ItemOneOf1Ingredient.md b/crates/rocie-client/docs/ItemOneOf1Ingredient.md new file mode 100644 index 0000000..db20b10 --- /dev/null +++ b/crates/rocie-client/docs/ItemOneOf1Ingredient.md @@ -0,0 +1,11 @@ +# ItemOneOf1Ingredient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **u32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/rocie-client/docs/ItemOneOf2.md b/crates/rocie-client/docs/ItemOneOf2.md index 8cfe0f3..aa7ee14 100644 --- a/crates/rocie-client/docs/ItemOneOf2.md +++ b/crates/rocie-client/docs/ItemOneOf2.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **u32** | | -**r#type** | **String** | | +**cookware** | [**models::ItemOneOf1Ingredient**](Item_oneOf_1_Ingredient.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ItemOneOf3.md b/crates/rocie-client/docs/ItemOneOf3.md index 2fd7331..669e1d5 100644 --- a/crates/rocie-client/docs/ItemOneOf3.md +++ b/crates/rocie-client/docs/ItemOneOf3.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **u32** | | -**r#type** | **String** | | +**timer** | [**models::ItemOneOf1Ingredient**](Item_oneOf_1_Ingredient.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ItemOneOf4.md b/crates/rocie-client/docs/ItemOneOf4.md index f50a058..4206c21 100644 --- a/crates/rocie-client/docs/ItemOneOf4.md +++ b/crates/rocie-client/docs/ItemOneOf4.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**index** | **u32** | | -**r#type** | **String** | | +**inline_quantity** | [**models::ItemOneOf1Ingredient**](Item_oneOf_1_Ingredient.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ItemOneOfText.md b/crates/rocie-client/docs/ItemOneOfText.md new file mode 100644 index 0000000..fa23caf --- /dev/null +++ b/crates/rocie-client/docs/ItemOneOfText.md @@ -0,0 +1,11 @@ +# ItemOneOfText + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/rocie-client/docs/ProvisionInfo.md b/crates/rocie-client/docs/ProvisionInfo.md new file mode 100644 index 0000000..7c2805e --- /dev/null +++ b/crates/rocie-client/docs/ProvisionInfo.md @@ -0,0 +1,12 @@ +# ProvisionInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**use_defaults** | **bool** | Whether we should apply the default configuration. | +**user** | [**models::UserStub**](UserStub.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/crates/rocie-client/docs/Timer.md b/crates/rocie-client/docs/Timer.md index 0e65ee7..5dcb8a5 100644 --- a/crates/rocie-client/docs/Timer.md +++ b/crates/rocie-client/docs/Timer.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | Option<**String**> | Name | [optional] -**quantity** | [**models::UnitAmount**](UnitAmount.md) | Time quantity | +**quantity** | Option<[**models::UnitAmount**](UnitAmount.md)> | Time quantity | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs b/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs index 1db2d9c..d1ff45a 100644 --- a/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs +++ b/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs @@ -93,9 +93,9 @@ pub async fn logout(configuration: &configuration::Configuration, ) -> Result<() } /// This only works, if no users exist yet. -pub async fn provision(configuration: &configuration::Configuration, user_stub: models::UserStub) -> Result<models::UserId, Error<ProvisionError>> { +pub async fn provision(configuration: &configuration::Configuration, provision_info: models::ProvisionInfo) -> Result<models::UserId, Error<ProvisionError>> { // add a prefix to parameters to efficiently prevent name collisions - let p_body_user_stub = user_stub; + let p_body_provision_info = provision_info; let uri_str = format!("{}/provision", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); @@ -103,7 +103,7 @@ pub async fn provision(configuration: &configuration::Configuration, user_stub: if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - req_builder = req_builder.json(&p_body_user_stub); + req_builder = req_builder.json(&p_body_provision_info); let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; diff --git a/crates/rocie-client/src/models/content.rs b/crates/rocie-client/src/models/content.rs index 8823605..357f675 100644 --- a/crates/rocie-client/src/models/content.rs +++ b/crates/rocie-client/src/models/content.rs @@ -25,18 +25,4 @@ impl Default for Content { Self::ContentOneOf(Default::default()) } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "step")] - Step, - #[serde(rename = "text")] - Text, -} - -impl Default for Type { - fn default() -> Type { - Self::Step - } -} diff --git a/crates/rocie-client/src/models/content_one_of.rs b/crates/rocie-client/src/models/content_one_of.rs index 1c82c61..02d5beb 100644 --- a/crates/rocie-client/src/models/content_one_of.rs +++ b/crates/rocie-client/src/models/content_one_of.rs @@ -14,32 +14,17 @@ use serde::{Deserialize, Serialize}; /// ContentOneOf : A step #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContentOneOf { - #[serde(rename = "type")] - pub r#type: Type, /// A step - #[serde(rename = "value")] - pub value: models::Step, + #[serde(rename = "Step")] + pub step: models::Step, } impl ContentOneOf { /// A step - pub fn new(r#type: Type, value: models::Step) -> ContentOneOf { + pub fn new(step: models::Step) -> ContentOneOf { ContentOneOf { - r#type, - value, + step, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "step")] - Step, -} - -impl Default for Type { - fn default() -> Type { - Self::Step - } -} diff --git a/crates/rocie-client/src/models/content_one_of_1.rs b/crates/rocie-client/src/models/content_one_of_1.rs index 148999d..760a08f 100644 --- a/crates/rocie-client/src/models/content_one_of_1.rs +++ b/crates/rocie-client/src/models/content_one_of_1.rs @@ -14,32 +14,17 @@ use serde::{Deserialize, Serialize}; /// ContentOneOf1 : A paragraph of just text, no instructions #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ContentOneOf1 { - #[serde(rename = "type")] - pub r#type: Type, /// A paragraph of just text, no instructions - #[serde(rename = "value")] - pub value: String, + #[serde(rename = "Text")] + pub text: String, } impl ContentOneOf1 { /// A paragraph of just text, no instructions - pub fn new(r#type: Type, value: String) -> ContentOneOf1 { + pub fn new(text: String) -> ContentOneOf1 { ContentOneOf1 { - r#type, - value, + text, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "text")] - Text, -} - -impl Default for Type { - fn default() -> Type { - Self::Text - } -} diff --git a/crates/rocie-client/src/models/item.rs b/crates/rocie-client/src/models/item.rs index d3460bc..ef6891f 100644 --- a/crates/rocie-client/src/models/item.rs +++ b/crates/rocie-client/src/models/item.rs @@ -28,24 +28,4 @@ impl Default for Item { Self::ItemOneOf(Default::default()) } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "text")] - Text, - #[serde(rename = "ingredient")] - Ingredient, - #[serde(rename = "cookware")] - Cookware, - #[serde(rename = "timer")] - Timer, - #[serde(rename = "inlineQuantity")] - InlineQuantity, -} - -impl Default for Type { - fn default() -> Type { - Self::Text - } -} diff --git a/crates/rocie-client/src/models/item_one_of.rs b/crates/rocie-client/src/models/item_one_of.rs index af9bbcc..684d9b7 100644 --- a/crates/rocie-client/src/models/item_one_of.rs +++ b/crates/rocie-client/src/models/item_one_of.rs @@ -14,31 +14,16 @@ use serde::{Deserialize, Serialize}; /// ItemOneOf : Just plain text #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ItemOneOf { - #[serde(rename = "type")] - pub r#type: Type, - #[serde(rename = "value")] - pub value: String, + #[serde(rename = "Text")] + pub text: models::ItemOneOfText, } impl ItemOneOf { /// Just plain text - pub fn new(r#type: Type, value: String) -> ItemOneOf { + pub fn new(text: models::ItemOneOfText) -> ItemOneOf { ItemOneOf { - r#type, - value, + text, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "text")] - Text, -} - -impl Default for Type { - fn default() -> Type { - Self::Text - } -} diff --git a/crates/rocie-client/src/models/item_one_of_1.rs b/crates/rocie-client/src/models/item_one_of_1.rs index 82888e7..618c56d 100644 --- a/crates/rocie-client/src/models/item_one_of_1.rs +++ b/crates/rocie-client/src/models/item_one_of_1.rs @@ -13,30 +13,15 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ItemOneOf1 { - #[serde(rename = "index")] - pub index: u32, - #[serde(rename = "type")] - pub r#type: Type, + #[serde(rename = "Ingredient")] + pub ingredient: models::ItemOneOf1Ingredient, } impl ItemOneOf1 { - pub fn new(index: u32, r#type: Type) -> ItemOneOf1 { + pub fn new(ingredient: models::ItemOneOf1Ingredient) -> ItemOneOf1 { ItemOneOf1 { - index, - r#type, + ingredient, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "ingredient")] - Ingredient, -} - -impl Default for Type { - fn default() -> Type { - Self::Ingredient - } -} diff --git a/crates/rocie-client/src/models/item_one_of_1_ingredient.rs b/crates/rocie-client/src/models/item_one_of_1_ingredient.rs new file mode 100644 index 0000000..59b21d3 --- /dev/null +++ b/crates/rocie-client/src/models/item_one_of_1_ingredient.rs @@ -0,0 +1,27 @@ +/* + * rocie-server + * + * An enterprise grocery management system - server + * + * The version of the OpenAPI document: 0.1.0 + * Contact: benedikt.peetz@b-peetz.de + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ItemOneOf1Ingredient { + #[serde(rename = "index")] + pub index: u32, +} + +impl ItemOneOf1Ingredient { + pub fn new(index: u32) -> ItemOneOf1Ingredient { + ItemOneOf1Ingredient { + index, + } + } +} + diff --git a/crates/rocie-client/src/models/item_one_of_2.rs b/crates/rocie-client/src/models/item_one_of_2.rs index 93fb342..11732d2 100644 --- a/crates/rocie-client/src/models/item_one_of_2.rs +++ b/crates/rocie-client/src/models/item_one_of_2.rs @@ -13,30 +13,15 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ItemOneOf2 { - #[serde(rename = "index")] - pub index: u32, - #[serde(rename = "type")] - pub r#type: Type, + #[serde(rename = "Cookware")] + pub cookware: models::ItemOneOf1Ingredient, } impl ItemOneOf2 { - pub fn new(index: u32, r#type: Type) -> ItemOneOf2 { + pub fn new(cookware: models::ItemOneOf1Ingredient) -> ItemOneOf2 { ItemOneOf2 { - index, - r#type, + cookware, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "cookware")] - Cookware, -} - -impl Default for Type { - fn default() -> Type { - Self::Cookware - } -} diff --git a/crates/rocie-client/src/models/item_one_of_3.rs b/crates/rocie-client/src/models/item_one_of_3.rs index eaae1ad..2b29f6a 100644 --- a/crates/rocie-client/src/models/item_one_of_3.rs +++ b/crates/rocie-client/src/models/item_one_of_3.rs @@ -13,30 +13,15 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ItemOneOf3 { - #[serde(rename = "index")] - pub index: u32, - #[serde(rename = "type")] - pub r#type: Type, + #[serde(rename = "Timer")] + pub timer: models::ItemOneOf1Ingredient, } impl ItemOneOf3 { - pub fn new(index: u32, r#type: Type) -> ItemOneOf3 { + pub fn new(timer: models::ItemOneOf1Ingredient) -> ItemOneOf3 { ItemOneOf3 { - index, - r#type, + timer, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "timer")] - Timer, -} - -impl Default for Type { - fn default() -> Type { - Self::Timer - } -} diff --git a/crates/rocie-client/src/models/item_one_of_4.rs b/crates/rocie-client/src/models/item_one_of_4.rs index 2abaf27..a3c29aa 100644 --- a/crates/rocie-client/src/models/item_one_of_4.rs +++ b/crates/rocie-client/src/models/item_one_of_4.rs @@ -13,30 +13,15 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ItemOneOf4 { - #[serde(rename = "index")] - pub index: u32, - #[serde(rename = "type")] - pub r#type: Type, + #[serde(rename = "InlineQuantity")] + pub inline_quantity: models::ItemOneOf1Ingredient, } impl ItemOneOf4 { - pub fn new(index: u32, r#type: Type) -> ItemOneOf4 { + pub fn new(inline_quantity: models::ItemOneOf1Ingredient) -> ItemOneOf4 { ItemOneOf4 { - index, - r#type, + inline_quantity, } } } -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "inlineQuantity")] - InlineQuantity, -} - -impl Default for Type { - fn default() -> Type { - Self::InlineQuantity - } -} diff --git a/crates/rocie-client/src/models/item_one_of_text.rs b/crates/rocie-client/src/models/item_one_of_text.rs new file mode 100644 index 0000000..b47f792 --- /dev/null +++ b/crates/rocie-client/src/models/item_one_of_text.rs @@ -0,0 +1,29 @@ +/* + * rocie-server + * + * An enterprise grocery management system - server + * + * The version of the OpenAPI document: 0.1.0 + * Contact: benedikt.peetz@b-peetz.de + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ItemOneOfText : Just plain text +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ItemOneOfText { + #[serde(rename = "value")] + pub value: String, +} + +impl ItemOneOfText { + /// Just plain text + pub fn new(value: String) -> ItemOneOfText { + ItemOneOfText { + value, + } + } +} + diff --git a/crates/rocie-client/src/models/mod.rs b/crates/rocie-client/src/models/mod.rs index 53b0c13..2b426a1 100644 --- a/crates/rocie-client/src/models/mod.rs +++ b/crates/rocie-client/src/models/mod.rs @@ -32,12 +32,16 @@ pub mod item_one_of; pub use self::item_one_of::ItemOneOf; pub mod item_one_of_1; pub use self::item_one_of_1::ItemOneOf1; +pub mod item_one_of_1_ingredient; +pub use self::item_one_of_1_ingredient::ItemOneOf1Ingredient; pub mod item_one_of_2; pub use self::item_one_of_2::ItemOneOf2; pub mod item_one_of_3; pub use self::item_one_of_3::ItemOneOf3; pub mod item_one_of_4; pub use self::item_one_of_4::ItemOneOf4; +pub mod item_one_of_text; +pub use self::item_one_of_text::ItemOneOfText; pub mod login_info; pub use self::login_info::LoginInfo; pub mod metadata; @@ -60,6 +64,8 @@ pub mod product_parent_stub; pub use self::product_parent_stub::ProductParentStub; pub mod product_stub; pub use self::product_stub::ProductStub; +pub mod provision_info; +pub use self::provision_info::ProvisionInfo; pub mod recipe; pub use self::recipe::Recipe; pub mod recipe_id; diff --git a/crates/rocie-client/src/models/provision_info.rs b/crates/rocie-client/src/models/provision_info.rs new file mode 100644 index 0000000..fc91f70 --- /dev/null +++ b/crates/rocie-client/src/models/provision_info.rs @@ -0,0 +1,31 @@ +/* + * rocie-server + * + * An enterprise grocery management system - server + * + * The version of the OpenAPI document: 0.1.0 + * Contact: benedikt.peetz@b-peetz.de + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProvisionInfo { + /// Whether we should apply the default configuration. + #[serde(rename = "use_defaults")] + pub use_defaults: bool, + #[serde(rename = "user")] + pub user: models::UserStub, +} + +impl ProvisionInfo { + pub fn new(use_defaults: bool, user: models::UserStub) -> ProvisionInfo { + ProvisionInfo { + use_defaults, + user, + } + } +} + diff --git a/crates/rocie-client/src/models/timer.rs b/crates/rocie-client/src/models/timer.rs index 6c06d61..290520f 100644 --- a/crates/rocie-client/src/models/timer.rs +++ b/crates/rocie-client/src/models/timer.rs @@ -18,16 +18,16 @@ pub struct Timer { #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// Time quantity - #[serde(rename = "quantity")] - pub quantity: models::UnitAmount, + #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] + pub quantity: Option<models::UnitAmount>, } impl Timer { /// A recipe timer If created from parsing, at least one of the fields is guaranteed to be [`Some`]. - pub fn new(quantity: models::UnitAmount) -> Timer { + pub fn new() -> Timer { Timer { name: None, - quantity, + quantity: None, } } } |
