rocie_client/models/cookware.rs
1// rocie - An enterprise grocery management system
2//
3// Copyright (C) 2026 Benedikt Peetz <benedikt.peetz@b-peetz.de>
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6// This file is part of Rocie.
7//
8// You should have received a copy of the License along with this program.
9// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
10
11/*
12 * rocie-server
13 *
14 * An enterprise grocery management system - server
15 *
16 * The version of the OpenAPI document: 0.1.0
17 * Contact: benedikt.peetz@b-peetz.de
18 * Generated by: https://openapi-generator.tech
19 */
20
21use crate::models;
22use serde::{Deserialize, Serialize};
23
24/// Cookware : A recipe cookware item
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct Cookware {
27 /// Alias
28 #[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
29 pub alias: Option<String>,
30 /// Name
31 #[serde(rename = "name")]
32 pub name: String,
33 /// Note
34 #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
35 pub note: Option<String>,
36 /// Amount needed Note that this is a value, not a quantity, so it doesn't have units.
37 #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")]
38 pub quantity: Option<u32>,
39}
40
41impl Cookware {
42 /// A recipe cookware item
43 pub fn new(name: String) -> Cookware {
44 Cookware {
45 alias: None,
46 name,
47 note: None,
48 quantity: None,
49 }
50 }
51}