openapi_github/models/
git_tag.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/// GitTag : Metadata for a Git tag
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GitTag {
17    #[serde(rename = "node_id")]
18    pub node_id: String,
19    /// Name of the tag
20    #[serde(rename = "tag")]
21    pub tag: String,
22    #[serde(rename = "sha")]
23    pub sha: String,
24    /// URL for the tag
25    #[serde(rename = "url")]
26    pub url: String,
27    /// Message describing the purpose of the tag
28    #[serde(rename = "message")]
29    pub message: String,
30    #[serde(rename = "tagger")]
31    pub tagger: Box<models::GitTagTagger>,
32    #[serde(rename = "object")]
33    pub object: Box<models::GitTagObject>,
34    #[serde(rename = "verification", skip_serializing_if = "Option::is_none")]
35    pub verification: Option<Box<models::Verification>>,
36}
37
38impl GitTag {
39    /// Metadata for a Git tag
40    pub fn new(node_id: String, tag: String, sha: String, url: String, message: String, tagger: models::GitTagTagger, object: models::GitTagObject) -> GitTag {
41        GitTag {
42            node_id,
43            tag,
44            sha,
45            url,
46            message,
47            tagger: Box::new(tagger),
48            object: Box::new(object),
49            verification: None,
50        }
51    }
52}
53