1
|
|
|
<?php declare(strict_types=1); |
2
|
|
|
|
3
|
|
|
namespace ApiClients\Client\Github\Resource; |
4
|
|
|
|
5
|
|
|
use ApiClients\Foundation\Hydrator\Annotation\EmptyResource; |
6
|
|
|
use ApiClients\Foundation\Hydrator\Annotation\Nested; |
7
|
|
|
use ApiClients\Foundation\Resource\AbstractResource; |
8
|
|
|
use DateTimeInterface; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @Nested( |
12
|
|
|
* owner="User" |
13
|
|
|
* ) |
14
|
|
|
* @EmptyResource("EmptyApp") |
15
|
|
|
*/ |
16
|
|
|
abstract class App extends AbstractResource implements AppInterface |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var int |
20
|
|
|
*/ |
21
|
|
|
protected $id; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var string |
25
|
|
|
*/ |
26
|
|
|
protected $slug; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var User |
30
|
|
|
*/ |
31
|
|
|
protected $owner; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
*/ |
36
|
|
|
protected $name; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var string |
40
|
|
|
*/ |
41
|
|
|
protected $description; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
*/ |
46
|
|
|
protected $external_url; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var string |
50
|
|
|
*/ |
51
|
|
|
protected $html_url; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var DateTimeInterface |
55
|
|
|
*/ |
56
|
|
|
protected $created_at; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var DateTimeInterface |
60
|
|
|
*/ |
61
|
|
|
protected $updated_at; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @var array |
65
|
|
|
*/ |
66
|
|
|
protected $permissions; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @var array |
70
|
|
|
*/ |
71
|
|
|
protected $events; |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* @var int |
75
|
|
|
*/ |
76
|
|
|
protected $installations_count; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @return int |
80
|
|
|
*/ |
81
|
|
|
public function id(): int |
82
|
|
|
{ |
83
|
|
|
return $this->id; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return string |
88
|
|
|
*/ |
89
|
|
|
public function slug(): string |
90
|
|
|
{ |
91
|
|
|
return $this->slug; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return User |
96
|
|
|
*/ |
97
|
|
|
public function owner(): User |
98
|
|
|
{ |
99
|
|
|
return $this->owner; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return string |
104
|
|
|
*/ |
105
|
|
|
public function name(): string |
106
|
|
|
{ |
107
|
|
|
return $this->name; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return string |
112
|
|
|
*/ |
113
|
|
|
public function description(): string |
114
|
|
|
{ |
115
|
|
|
return $this->description; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return string |
120
|
|
|
*/ |
121
|
|
|
public function externalUrl(): string |
122
|
|
|
{ |
123
|
|
|
return $this->external_url; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return string |
128
|
|
|
*/ |
129
|
|
|
public function htmlUrl(): string |
130
|
|
|
{ |
131
|
|
|
return $this->html_url; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return DateTimeInterface |
136
|
|
|
*/ |
137
|
|
|
public function createdAt(): DateTimeInterface |
138
|
|
|
{ |
139
|
|
|
return $this->created_at; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @return DateTimeInterface |
144
|
|
|
*/ |
145
|
|
|
public function updatedAt(): DateTimeInterface |
146
|
|
|
{ |
147
|
|
|
return $this->updated_at; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return array |
152
|
|
|
*/ |
153
|
|
|
public function permissions(): array |
154
|
|
|
{ |
155
|
|
|
return $this->permissions; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @return array |
160
|
|
|
*/ |
161
|
|
|
public function events(): array |
162
|
|
|
{ |
163
|
|
|
return $this->events; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return int |
168
|
|
|
*/ |
169
|
|
|
public function installationsCount(): int |
170
|
|
|
{ |
171
|
|
|
return $this->installations_count; |
172
|
|
|
} |
173
|
|
|
} |
174
|
|
|
|