openapi_github/models/
feed__links.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 FeedLinks {
16    #[serde(rename = "timeline")]
17    pub timeline: Box<models::LinkWithType>,
18    #[serde(rename = "user")]
19    pub user: Box<models::LinkWithType>,
20    #[serde(rename = "security_advisories", skip_serializing_if = "Option::is_none")]
21    pub security_advisories: Option<Box<models::LinkWithType>>,
22    #[serde(rename = "current_user", skip_serializing_if = "Option::is_none")]
23    pub current_user: Option<Box<models::LinkWithType>>,
24    #[serde(rename = "current_user_public", skip_serializing_if = "Option::is_none")]
25    pub current_user_public: Option<Box<models::LinkWithType>>,
26    #[serde(rename = "current_user_actor", skip_serializing_if = "Option::is_none")]
27    pub current_user_actor: Option<Box<models::LinkWithType>>,
28    #[serde(rename = "current_user_organization", skip_serializing_if = "Option::is_none")]
29    pub current_user_organization: Option<Box<models::LinkWithType>>,
30    #[serde(rename = "current_user_organizations", skip_serializing_if = "Option::is_none")]
31    pub current_user_organizations: Option<Vec<models::LinkWithType>>,
32    #[serde(rename = "repository_discussions", skip_serializing_if = "Option::is_none")]
33    pub repository_discussions: Option<Box<models::LinkWithType>>,
34    #[serde(rename = "repository_discussions_category", skip_serializing_if = "Option::is_none")]
35    pub repository_discussions_category: Option<Box<models::LinkWithType>>,
36}
37
38impl FeedLinks {
39    pub fn new(timeline: models::LinkWithType, user: models::LinkWithType) -> FeedLinks {
40        FeedLinks {
41            timeline: Box::new(timeline),
42            user: Box::new(user),
43            security_advisories: None,
44            current_user: None,
45            current_user_public: None,
46            current_user_actor: None,
47            current_user_organization: None,
48            current_user_organizations: None,
49            repository_discussions: None,
50            repository_discussions_category: None,
51        }
52    }
53}
54