1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* GitHub's official OpenAPI spec + Octokit extension
*
* OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
*
* The version of the OpenAPI document: 16.6.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// NullableCodespaceMachine : A description of the machine powering a codespace.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NullableCodespaceMachine {
/// The name of the machine.
#[serde(rename = "name")]
pub name: String,
/// The display name of the machine includes cores, memory, and storage.
#[serde(rename = "display_name")]
pub display_name: String,
/// The operating system of the machine.
#[serde(rename = "operating_system")]
pub operating_system: String,
/// How much storage is available to the codespace.
#[serde(rename = "storage_in_bytes")]
pub storage_in_bytes: i32,
/// How much memory is available to the codespace.
#[serde(rename = "memory_in_bytes")]
pub memory_in_bytes: i32,
/// How many cores are available to the codespace.
#[serde(rename = "cpus")]
pub cpus: i32,
/// Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be \"null\" if prebuilds are not supported or prebuild availability could not be determined. Value will be \"none\" if no prebuild is available. Latest values \"ready\" and \"in_progress\" indicate the prebuild availability status.
#[serde(rename = "prebuild_availability", deserialize_with = "Option::deserialize")]
pub prebuild_availability: Option<PrebuildAvailability>,
}
impl NullableCodespaceMachine {
/// A description of the machine powering a codespace.
pub fn new(name: String, display_name: String, operating_system: String, storage_in_bytes: i32, memory_in_bytes: i32, cpus: i32, prebuild_availability: Option<PrebuildAvailability>) -> NullableCodespaceMachine {
NullableCodespaceMachine {
name,
display_name,
operating_system,
storage_in_bytes,
memory_in_bytes,
cpus,
prebuild_availability,
}
}
}
/// Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be \"null\" if prebuilds are not supported or prebuild availability could not be determined. Value will be \"none\" if no prebuild is available. Latest values \"ready\" and \"in_progress\" indicate the prebuild availability status.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PrebuildAvailability {
#[serde(rename = "none")]
None,
#[serde(rename = "ready")]
Ready,
#[serde(rename = "in_progress")]
InProgress,
}
impl Default for PrebuildAvailability {
fn default() -> PrebuildAvailability {
Self::None
}
}