openapi_github/models/
content_symlink.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/// ContentSymlink : An object describing a symlink
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ContentSymlink {
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    #[serde(rename = "target")]
20    pub target: String,
21    #[serde(rename = "size")]
22    pub size: i32,
23    #[serde(rename = "name")]
24    pub name: String,
25    #[serde(rename = "path")]
26    pub path: String,
27    #[serde(rename = "sha")]
28    pub sha: String,
29    #[serde(rename = "url")]
30    pub url: String,
31    #[serde(rename = "git_url", deserialize_with = "Option::deserialize")]
32    pub git_url: Option<String>,
33    #[serde(rename = "html_url", deserialize_with = "Option::deserialize")]
34    pub html_url: Option<String>,
35    #[serde(rename = "download_url", deserialize_with = "Option::deserialize")]
36    pub download_url: Option<String>,
37    #[serde(rename = "_links")]
38    pub _links: Box<models::ContentTreeEntriesInnerLinks>,
39}
40
41impl ContentSymlink {
42    /// An object describing a symlink
43    pub fn new(r#type: Type, target: String, size: i32, name: String, path: String, sha: String, url: String, git_url: Option<String>, html_url: Option<String>, download_url: Option<String>, _links: models::ContentTreeEntriesInnerLinks) -> ContentSymlink {
44        ContentSymlink {
45            r#type,
46            target,
47            size,
48            name,
49            path,
50            sha,
51            url,
52            git_url,
53            html_url,
54            download_url,
55            _links: Box::new(_links),
56        }
57    }
58}
59/// 
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum Type {
62    #[serde(rename = "symlink")]
63    Symlink,
64}
65
66impl Default for Type {
67    fn default() -> Type {
68        Self::Symlink
69    }
70}
71