/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GithubInstallationsInner {
    #[serde(rename = "workspace_id", skip_serializing_if = "Option::is_none")]
    pub workspace_id: Option<String>,
    #[serde(rename = "installation_id")]
    pub installation_id: f64,
    #[serde(rename = "account_id")]
    pub account_id: String,
    #[serde(rename = "repositories")]
    pub repositories: Vec<models::GithubInstallationsInnerRepositoriesInner>,
    /// Total number of repositories available for this installation
    #[serde(rename = "total_count")]
    pub total_count: f64,
    /// Number of repositories loaded per page
    #[serde(rename = "per_page")]
    pub per_page: f64,
    /// Error message if token retrieval failed
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

impl GithubInstallationsInner {
    pub fn new(installation_id: f64, account_id: String, repositories: Vec<models::GithubInstallationsInnerRepositoriesInner>, total_count: f64, per_page: f64) -> GithubInstallationsInner {
        GithubInstallationsInner {
            workspace_id: None,
            installation_id,
            account_id,
            repositories,
            total_count,
            per_page,
            error: None,
        }
    }
}

