windmill_api/models/
github_installations_inner.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.593.0
7 * Contact: contact@windmill.dev
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 GithubInstallationsInner {
16    #[serde(rename = "workspace_id", skip_serializing_if = "Option::is_none")]
17    pub workspace_id: Option<String>,
18    #[serde(rename = "installation_id")]
19    pub installation_id: f64,
20    #[serde(rename = "account_id")]
21    pub account_id: String,
22    #[serde(rename = "repositories")]
23    pub repositories: Vec<models::GithubInstallationsInnerRepositoriesInner>,
24    /// Total number of repositories available for this installation
25    #[serde(rename = "total_count")]
26    pub total_count: f64,
27    /// Number of repositories loaded per page
28    #[serde(rename = "per_page")]
29    pub per_page: f64,
30    /// Error message if token retrieval failed
31    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
32    pub error: Option<String>,
33}
34
35impl GithubInstallationsInner {
36    pub fn new(installation_id: f64, account_id: String, repositories: Vec<models::GithubInstallationsInnerRepositoriesInner>, total_count: f64, per_page: f64) -> GithubInstallationsInner {
37        GithubInstallationsInner {
38            workspace_id: None,
39            installation_id,
40            account_id,
41            repositories,
42            total_count,
43            per_page,
44            error: None,
45        }
46    }
47}
48