-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathGitHubPlan.ps1
More file actions
40 lines (32 loc) · 1.05 KB
/
GitHubPlan.ps1
File metadata and controls
40 lines (32 loc) · 1.05 KB
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
class GitHubPlan {
# The name of the plan.
# Example: free, enterprise
[string] $Name
# The number of private repositories allowed.
# Example: 20
[System.Nullable[uint]] $PrivateRepos
# The number of collaborators allowed.
# Example: 3
[System.Nullable[uint]] $Collaborators
# The amount of space allocated in bytes.
# Example: 976562499
[System.Nullable[uint]] $Space
# The total number of user seats included in the plan.
# Example: 10
[System.Nullable[uint]] $Seats
# The number of seats currently filled.
# Example: 7
[System.Nullable[uint]] $FilledSeats
GitHubPlan() {}
GitHubPlan([PSCustomObject]$Object) {
$this.Name = $Object.name
$this.PrivateRepos = $Object.private_repos ?? $Object.PrivateRepos
$this.Collaborators = $Object.collaborators
$this.Space = $Object.space
$this.Seats = $Object.seats
$this.FilledSeats = $Object.filled_seats ?? $Object.FilledSeats
}
[string] ToString() {
return $this.Name
}
}