Skip to main content

rocie_client/models/
section.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/// Section : A section holding steps
25#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
26pub struct Section {
27    /// Content inside
28    #[serde(rename = "content")]
29    pub content: Vec<models::Content>,
30    /// Name of the section
31    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
32    pub name: Option<String>,
33}
34
35impl Section {
36    /// A section holding steps
37    pub fn new(content: Vec<models::Content>) -> Section {
38        Section {
39            content,
40            name: None,
41        }
42    }
43}