Skip to main content

rocie_client/models/
timer.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/// Timer : A recipe timer  If created from parsing, at least one of the fields is guaranteed to be [`Some`].
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct Timer {
27    /// Name
28    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
29    pub name: Option<String>,
30    /// Time quantity
31    #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")]
32    pub quantity: Option<models::UnitAmount>,
33}
34
35impl Timer {
36    /// A recipe timer  If created from parsing, at least one of the fields is guaranteed to be [`Some`].
37    pub fn new() -> Timer {
38        Timer {
39            name: None,
40            quantity: None,
41        }
42    }
43}