use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Enterprise {
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub description: Option<Option<String>>,
#[serde(rename = "html_url")]
pub html_url: String,
#[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub website_url: Option<Option<String>>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "node_id")]
pub node_id: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "slug")]
pub slug: String,
#[serde(rename = "created_at", deserialize_with = "Option::deserialize")]
pub created_at: Option<String>,
#[serde(rename = "updated_at", deserialize_with = "Option::deserialize")]
pub updated_at: Option<String>,
#[serde(rename = "avatar_url")]
pub avatar_url: String,
}
impl Enterprise {
pub fn new(html_url: String, id: i32, node_id: String, name: String, slug: String, created_at: Option<String>, updated_at: Option<String>, avatar_url: String) -> Enterprise {
Enterprise {
description: None,
html_url,
website_url: None,
id,
node_id,
name,
slug,
created_at,
updated_at,
avatar_url,
}
}
}