openapi_github/models/
reactions_create_for_commit_comment_request.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReactionsCreateForCommitCommentRequest {
16    /// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment.
17    #[serde(rename = "content")]
18    pub content: Content,
19}
20
21impl ReactionsCreateForCommitCommentRequest {
22    pub fn new(content: Content) -> ReactionsCreateForCommitCommentRequest {
23        ReactionsCreateForCommitCommentRequest {
24            content,
25        }
26    }
27}
28/// The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment.
29#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
30pub enum Content {
31    #[serde(rename = "+1")]
32    Plus1,
33    #[serde(rename = "-1")]
34    Variant1,
35    #[serde(rename = "laugh")]
36    Laugh,
37    #[serde(rename = "confused")]
38    Confused,
39    #[serde(rename = "heart")]
40    Heart,
41    #[serde(rename = "hooray")]
42    Hooray,
43    #[serde(rename = "rocket")]
44    Rocket,
45    #[serde(rename = "eyes")]
46    Eyes,
47}
48
49impl Default for Content {
50    fn default() -> Content {
51        Self::Plus1
52    }
53}
54