openapi_github/models/
author_association.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/// AuthorAssociation : How the author is associated with the repository.
15/// How the author is associated with the repository.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AuthorAssociation {
18    #[serde(rename = "COLLABORATOR")]
19    Collaborator,
20    #[serde(rename = "CONTRIBUTOR")]
21    Contributor,
22    #[serde(rename = "FIRST_TIMER")]
23    FirstTimer,
24    #[serde(rename = "FIRST_TIME_CONTRIBUTOR")]
25    FirstTimeContributor,
26    #[serde(rename = "MANNEQUIN")]
27    Mannequin,
28    #[serde(rename = "MEMBER")]
29    Member,
30    #[serde(rename = "NONE")]
31    None,
32    #[serde(rename = "OWNER")]
33    Owner,
34
35}
36
37impl std::fmt::Display for AuthorAssociation {
38    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
39        match self {
40            Self::Collaborator => write!(f, "COLLABORATOR"),
41            Self::Contributor => write!(f, "CONTRIBUTOR"),
42            Self::FirstTimer => write!(f, "FIRST_TIMER"),
43            Self::FirstTimeContributor => write!(f, "FIRST_TIME_CONTRIBUTOR"),
44            Self::Mannequin => write!(f, "MANNEQUIN"),
45            Self::Member => write!(f, "MEMBER"),
46            Self::None => write!(f, "NONE"),
47            Self::Owner => write!(f, "OWNER"),
48        }
49    }
50}
51
52impl Default for AuthorAssociation {
53    fn default() -> AuthorAssociation {
54        Self::Collaborator
55    }
56}
57