fastcomments_sdk/client/src/models/
create_moderator_body.rs

1/*
2 * fastcomments
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::client::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateModeratorBody {
16    #[serde(rename = "name")]
17    pub name: String,
18    #[serde(rename = "email")]
19    pub email: String,
20    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
21    pub user_id: Option<String>,
22    #[serde(rename = "moderationGroupIds", skip_serializing_if = "Option::is_none")]
23    pub moderation_group_ids: Option<Vec<String>>,
24}
25
26impl CreateModeratorBody {
27    pub fn new(name: String, email: String) -> CreateModeratorBody {
28        CreateModeratorBody {
29            name,
30            email,
31            user_id: None,
32            moderation_group_ids: None,
33        }
34    }
35}
36