Skip to main content

exoscale_rs/models/
github_auth_integration.rs

1/*
2 * Exoscale API
3 *
4 * Infrastructure automation API, allowing programmatic access to all Exoscale products and services.
5 *
6 * The version of the OpenAPI document: 2.0.0
7 * Contact: support@exoscale.com
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 GithubAuthIntegration {
16    #[serde(rename = "allow_sign_up", skip_serializing_if = "Option::is_none")]
17    pub allow_sign_up: Option<bool>,
18    #[serde(rename = "allowed_organizations", skip_serializing_if = "Option::is_none")]
19    pub allowed_organizations: Option<Vec<String>>,
20    #[serde(rename = "auto_login", skip_serializing_if = "Option::is_none")]
21    pub auto_login: Option<bool>,
22    #[serde(rename = "client_id")]
23    pub client_id: String,
24    #[serde(rename = "client_secret")]
25    pub client_secret: String,
26    #[serde(rename = "skip_org_role_sync", skip_serializing_if = "Option::is_none")]
27    pub skip_org_role_sync: Option<bool>,
28    #[serde(rename = "team_ids", skip_serializing_if = "Option::is_none")]
29    pub team_ids: Option<Vec<u64>>,
30}
31
32impl GithubAuthIntegration {
33    pub fn new(client_id: String, client_secret: String) -> GithubAuthIntegration {
34        GithubAuthIntegration {
35            allow_sign_up: None,
36            allowed_organizations: None,
37            auto_login: None,
38            client_id,
39            client_secret,
40            skip_org_role_sync: None,
41            team_ids: None,
42        }
43    }
44}
45