openapi_github/models/
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/// Classroom : A GitHub Classroom classroom
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Classroom {
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    /// Whether classroom is archived.
24    #[serde(rename = "archived")]
25    pub archived: bool,
26    #[serde(rename = "organization")]
27    pub organization: Box<models::SimpleClassroomOrganization>,
28    /// The URL of the classroom on GitHub Classroom.
29    #[serde(rename = "url")]
30    pub url: String,
31}
32
33impl Classroom {
34    /// A GitHub Classroom classroom
35    pub fn new(id: i32, name: String, archived: bool, organization: models::SimpleClassroomOrganization, url: String) -> Classroom {
36        Classroom {
37            id,
38            name,
39            archived,
40            organization: Box::new(organization),
41            url,
42        }
43    }
44}
45