openapi_github/models/
git_commit_verification.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 GitCommitVerification {
16    #[serde(rename = "verified")]
17    pub verified: bool,
18    #[serde(rename = "reason")]
19    pub reason: String,
20    #[serde(rename = "signature", deserialize_with = "Option::deserialize")]
21    pub signature: Option<String>,
22    #[serde(rename = "payload", deserialize_with = "Option::deserialize")]
23    pub payload: Option<String>,
24}
25
26impl GitCommitVerification {
27    pub fn new(verified: bool, reason: String, signature: Option<String>, payload: Option<String>) -> GitCommitVerification {
28        GitCommitVerification {
29            verified,
30            reason,
31            signature,
32            payload,
33        }
34    }
35}
36