// SPDX-FileCopyrightText: Politik im Blick developers
// SPDX-FileCopyrightText: Wolfgang Silbermayr <wolfgang@silbermayr.at>
//
// SPDX-License-Identifier: AGPL-3.0-or-later OR EUPL-1.2

use oparl_types::{BodyClassification, DateTime, EmailAddress, Name, Url};
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RequestBody {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub short_name: Option<Option<Name>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<Name>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub website: Option<Option<Url>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub license: Option<Option<Url>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub license_valid_since: Option<Option<DateTime>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub oparl_since: Option<Option<DateTime>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub ags: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub rgs: Option<Option<String>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contact_email: Option<Option<EmailAddress>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub contact_name: Option<Option<Name>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub classification: Option<Option<BodyClassification>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub web: Option<Option<Url>>,

    #[serde(skip_serializing_if = "Option::is_none")]
    pub is_public: Option<bool>,
}
