openapi_github/models/
copilot_organization_details.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/// CopilotOrganizationDetails : Information about the seat breakdown and policies set for an organization with a Copilot Business subscription.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CopilotOrganizationDetails {
17    #[serde(rename = "seat_breakdown")]
18    pub seat_breakdown: Box<models::CopilotSeatBreakdown>,
19    /// The organization policy for allowing or disallowing Copilot to make suggestions that match public code.
20    #[serde(rename = "public_code_suggestions")]
21    pub public_code_suggestions: PublicCodeSuggestions,
22    /// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
23    #[serde(rename = "ide_chat", skip_serializing_if = "Option::is_none")]
24    pub ide_chat: Option<IdeChat>,
25    /// The organization policy for allowing or disallowing organization members to use Copilot features within github.com.
26    #[serde(rename = "platform_chat", skip_serializing_if = "Option::is_none")]
27    pub platform_chat: Option<PlatformChat>,
28    /// The organization policy for allowing or disallowing organization members to use Copilot within their CLI.
29    #[serde(rename = "cli", skip_serializing_if = "Option::is_none")]
30    pub cli: Option<Cli>,
31    /// The mode of assigning new seats.
32    #[serde(rename = "seat_management_setting")]
33    pub seat_management_setting: SeatManagementSetting,
34}
35
36impl CopilotOrganizationDetails {
37    /// Information about the seat breakdown and policies set for an organization with a Copilot Business subscription.
38    pub fn new(seat_breakdown: models::CopilotSeatBreakdown, public_code_suggestions: PublicCodeSuggestions, seat_management_setting: SeatManagementSetting) -> CopilotOrganizationDetails {
39        CopilotOrganizationDetails {
40            seat_breakdown: Box::new(seat_breakdown),
41            public_code_suggestions,
42            ide_chat: None,
43            platform_chat: None,
44            cli: None,
45            seat_management_setting,
46        }
47    }
48}
49/// The organization policy for allowing or disallowing Copilot to make suggestions that match public code.
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum PublicCodeSuggestions {
52    #[serde(rename = "allow")]
53    Allow,
54    #[serde(rename = "block")]
55    Block,
56    #[serde(rename = "unconfigured")]
57    Unconfigured,
58    #[serde(rename = "unknown")]
59    Unknown,
60}
61
62impl Default for PublicCodeSuggestions {
63    fn default() -> PublicCodeSuggestions {
64        Self::Allow
65    }
66}
67/// The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
68#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
69pub enum IdeChat {
70    #[serde(rename = "enabled")]
71    Enabled,
72    #[serde(rename = "disabled")]
73    Disabled,
74    #[serde(rename = "unconfigured")]
75    Unconfigured,
76}
77
78impl Default for IdeChat {
79    fn default() -> IdeChat {
80        Self::Enabled
81    }
82}
83/// The organization policy for allowing or disallowing organization members to use Copilot features within github.com.
84#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
85pub enum PlatformChat {
86    #[serde(rename = "enabled")]
87    Enabled,
88    #[serde(rename = "disabled")]
89    Disabled,
90    #[serde(rename = "unconfigured")]
91    Unconfigured,
92}
93
94impl Default for PlatformChat {
95    fn default() -> PlatformChat {
96        Self::Enabled
97    }
98}
99/// The organization policy for allowing or disallowing organization members to use Copilot within their CLI.
100#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
101pub enum Cli {
102    #[serde(rename = "enabled")]
103    Enabled,
104    #[serde(rename = "disabled")]
105    Disabled,
106    #[serde(rename = "unconfigured")]
107    Unconfigured,
108}
109
110impl Default for Cli {
111    fn default() -> Cli {
112        Self::Enabled
113    }
114}
115/// The mode of assigning new seats.
116#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
117pub enum SeatManagementSetting {
118    #[serde(rename = "assign_all")]
119    AssignAll,
120    #[serde(rename = "assign_selected")]
121    AssignSelected,
122    #[serde(rename = "disabled")]
123    Disabled,
124    #[serde(rename = "unconfigured")]
125    Unconfigured,
126}
127
128impl Default for SeatManagementSetting {
129    fn default() -> SeatManagementSetting {
130        Self::AssignAll
131    }
132}
133