openapi_github/models/
interaction_group.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/// InteractionGroup : The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
15/// The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum InteractionGroup {
18    #[serde(rename = "existing_users")]
19    ExistingUsers,
20    #[serde(rename = "contributors_only")]
21    ContributorsOnly,
22    #[serde(rename = "collaborators_only")]
23    CollaboratorsOnly,
24
25}
26
27impl std::fmt::Display for InteractionGroup {
28    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Self::ExistingUsers => write!(f, "existing_users"),
31            Self::ContributorsOnly => write!(f, "contributors_only"),
32            Self::CollaboratorsOnly => write!(f, "collaborators_only"),
33        }
34    }
35}
36
37impl Default for InteractionGroup {
38    fn default() -> InteractionGroup {
39        Self::ExistingUsers
40    }
41}
42