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