mirror of
https://github.com/tribufu/sdk-rust
synced 2026-02-04 09:23:08 +00:00
73 lines
2.8 KiB
Rust
73 lines
2.8 KiB
Rust
/*
|
|
* 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 Group {
|
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
|
pub id: Option<String>,
|
|
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
|
|
pub uuid: Option<uuid::Uuid>,
|
|
#[serde(rename = "name", deserialize_with = "Option::deserialize")]
|
|
pub name: Option<String>,
|
|
#[serde(rename = "tag", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
pub tag: Option<Option<String>>,
|
|
#[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
pub description: Option<Option<String>>,
|
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
|
pub r#type: Option<i32>,
|
|
#[serde(rename = "privacy", skip_serializing_if = "Option::is_none")]
|
|
pub privacy: Option<i32>,
|
|
#[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
|
|
pub owner_id: Option<String>,
|
|
#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
|
|
pub verified: Option<bool>,
|
|
#[serde(rename = "photo_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
pub photo_url: Option<Option<String>>,
|
|
#[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
pub banner_url: Option<Option<String>>,
|
|
#[serde(rename = "member_count", skip_serializing_if = "Option::is_none")]
|
|
pub member_count: Option<i32>,
|
|
#[serde(rename = "follower_count", skip_serializing_if = "Option::is_none")]
|
|
pub follower_count: Option<i32>,
|
|
#[serde(rename = "view_count", skip_serializing_if = "Option::is_none")]
|
|
pub view_count: Option<i32>,
|
|
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
|
|
pub created: Option<String>,
|
|
#[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
|
pub updated: Option<Option<String>>,
|
|
}
|
|
|
|
impl Group {
|
|
pub fn new(name: Option<String>) -> Group {
|
|
Group {
|
|
id: None,
|
|
uuid: None,
|
|
name,
|
|
tag: None,
|
|
description: None,
|
|
r#type: None,
|
|
privacy: None,
|
|
owner_id: None,
|
|
verified: None,
|
|
photo_url: None,
|
|
banner_url: None,
|
|
member_count: None,
|
|
follower_count: None,
|
|
view_count: None,
|
|
created: None,
|
|
updated: None,
|
|
}
|
|
}
|
|
}
|
|
|