openapi_github/models/
git_ref.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/// GitRef : Git references within a repository
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GitRef {
17    #[serde(rename = "ref")]
18    pub r#ref: String,
19    #[serde(rename = "node_id")]
20    pub node_id: String,
21    #[serde(rename = "url")]
22    pub url: String,
23    #[serde(rename = "object")]
24    pub object: Box<models::GitRefObject>,
25}
26
27impl GitRef {
28    /// Git references within a repository
29    pub fn new(r#ref: String, node_id: String, url: String, object: models::GitRefObject) -> GitRef {
30        GitRef {
31            r#ref,
32            node_id,
33            url,
34            object: Box::new(object),
35        }
36    }
37}
38