-
Notifications
You must be signed in to change notification settings - Fork 0
/
Part3-BluebirdPSUserClass-AddMethods.ps1
50 lines (42 loc) · 1.15 KB
/
Part3-BluebirdPSUserClass-AddMethods.ps1
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
# class definition created by ConvertTo-ClassDefinition at 2/2/2021 12:19:34 AM for object type PSCustomObject
class BluebirdPSUser {
# properties
hidden [String]$IdStr
[String]$Location
[String]$ScreenName
[System.Int64]$Id
[System.Boolean]$DefaultProfile
# constructors
BluebirdPSUser () { }
BluebirdPSUser ([PSCustomObject]$InputObject) {
$this.IdStr = $InputObject.id_str
$this.Location = $InputObject.location
$this.ScreenName = $InputObject.screen_name
$this.Id = $InputObject.id
$this.DefaultProfile = $InputObject.default_profile
}
<# original output from ConvertTo-ClassDefinition
[OutputTypeName] UpdateProfile (
[TypeName]$Param1,
[TypeName]$Param2
) {
# your code
return $Output
}
[OutputTypeName] SetLocation (
[TypeName]$Param1,
[TypeName]$Param2
) {
# your code
return $Output
}
#>
# update code
[string] UpdateProfile ( ) {
return ("Updated Profile for {0}" -f $this.ScreenName)
}
# update code
[bool] SetLocation () {
return $false
}
}