openapi_github/models/
simple_classroom.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SimpleClassroom : A GitHub Classroom classroom
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SimpleClassroom {
17    /// Unique identifier of the classroom.
18    #[serde(rename = "id")]
19    pub id: i32,
20    /// The name of the classroom.
21    #[serde(rename = "name")]
22    pub name: String,
23    /// Returns whether classroom is archived or not.
24    #[serde(rename = "archived")]
25    pub archived: bool,
26    /// The url of the classroom on GitHub Classroom.
27    #[serde(rename = "url")]
28    pub url: String,
29}
30
31impl SimpleClassroom {
32    /// A GitHub Classroom classroom
33    pub fn new(id: i32, name: String, archived: bool, url: String) -> SimpleClassroom {
34        SimpleClassroom {
35            id,
36            name,
37            archived,
38            url,
39        }
40    }
41}
42