openapi_github/models/
repository_subscription.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/// RepositorySubscription : Repository invitations let you manage who you collaborate with.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RepositorySubscription {
17    /// Determines if notifications should be received from this repository.
18    #[serde(rename = "subscribed")]
19    pub subscribed: bool,
20    /// Determines if all notifications should be blocked from this repository.
21    #[serde(rename = "ignored")]
22    pub ignored: bool,
23    #[serde(rename = "reason", deserialize_with = "Option::deserialize")]
24    pub reason: Option<String>,
25    #[serde(rename = "created_at")]
26    pub created_at: String,
27    #[serde(rename = "url")]
28    pub url: String,
29    #[serde(rename = "repository_url")]
30    pub repository_url: String,
31}
32
33impl RepositorySubscription {
34    /// Repository invitations let you manage who you collaborate with.
35    pub fn new(subscribed: bool, ignored: bool, reason: Option<String>, created_at: String, url: String, repository_url: String) -> RepositorySubscription {
36        RepositorySubscription {
37            subscribed,
38            ignored,
39            reason,
40            created_at,
41            url,
42            repository_url,
43        }
44    }
45}
46