/*
 * Tribufu API
 *
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GroupApplication {
    #[serde(rename = "group_id")]
    pub group_id: String,
    #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
    pub group: Option<Box<models::Group>>,
    #[serde(rename = "application_id", skip_serializing_if = "Option::is_none")]
    pub application_id: Option<String>,
    #[serde(rename = "application", skip_serializing_if = "Option::is_none")]
    pub application: Option<Box<models::Application>>,
    #[serde(rename = "stats", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub stats: Option<Option<serde_json::Value>>,
    #[serde(rename = "acquired", skip_serializing_if = "Option::is_none")]
    pub acquired: Option<String>,
    #[serde(rename = "last_used", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_used: Option<Option<String>>,
}

impl GroupApplication {
    pub fn new(group_id: String) -> GroupApplication {
        GroupApplication {
            group_id,
            group: None,
            application_id: None,
            application: None,
            stats: None,
            acquired: None,
            last_used: None,
        }
    }
}

