Skip to content
Navigation Menu
{{ message }}
forked from beluga-php/docker-php-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageSummary.php
More file actions
379 lines (345 loc) · 10.7 KB
/
Copy pathImageSummary.php
File metadata and controls
379 lines (345 loc) · 10.7 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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<?php
declare(strict_types=1);
namespace Docker\API\Model;
class ImageSummary extends \ArrayObject
{
/**
* @var array
*/
protected $initialized = [];
public function isInitialized($property): bool
{
return \array_key_exists($property, $this->initialized);
}
/**
* ID is the content-addressable ID of an image.
*
* This identifier is a content-addressable digest calculated from the
* image's configuration (which includes the digests of layers used by
* the image).
*
* Note that this digest differs from the `RepoDigests` below, which
* holds digests of image manifests that reference the image.
*
* @var string|null
*/
protected $id;
/**
* ID of the parent image.
*
* Depending on how the image was created, this field may be empty and
* is only set for images that were built/created locally. This field
* is empty if the image was pulled from an image registry.
*
* @var string|null
*/
protected $parentId;
/**
* List of image names/tags in the local image cache that reference this
* image.
*
* Multiple image tags can refer to the same image, and this list may be
* empty if no tags reference the image, in which case the image is
* "untagged", in which case it can still be referenced by its ID.
*
* @var list<string>|null
*/
protected $repoTags;
/**
* List of content-addressable digests of locally available image manifests
* that the image is referenced from. Multiple manifests can refer to the
* same image.
*
* These digests are usually only available if the image was either pulled
* from a registry, or if the image was pushed to a registry, which is when
* the manifest is generated and its digest calculated.
*
* @var list<string>|null
*/
protected $repoDigests;
/**
* Date and time at which the image was created as a Unix timestamp
* (number of seconds sinds EPOCH).
*
* @var int|null
*/
protected $created;
/**
* Total size of the image including all layers it is composed of.
*
* @var int|null
*/
protected $size;
/**
* Total size of image layers that are shared between this image and other
* images.
*
* This size is not calculated by default. `-1` indicates that the value
* has not been set / calculated.
*
* @var int|null
*/
protected $sharedSize;
/**
* Total size of the image including all layers it is composed of.
*
* Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.
*
* @var int|null
*/
protected $virtualSize;
/**
* User-defined key/value metadata.
*
* @var array<string, string>|null
*/
protected $labels;
/**
* Number of containers using this image. Includes both stopped and running
* containers.
*
* This size is not calculated by default, and depends on which API endpoint
* is used. `-1` indicates that the value has not been set / calculated.
*
* @var int|null
*/
protected $containers;
/**
* ID is the content-addressable ID of an image.
*
* This identifier is a content-addressable digest calculated from the
* image's configuration (which includes the digests of layers used by
* the image).
*
* Note that this digest differs from the `RepoDigests` below, which
* holds digests of image manifests that reference the image.
*/
public function getId(): ?string
{
return $this->id;
}
/**
* ID is the content-addressable ID of an image.
*
* This identifier is a content-addressable digest calculated from the
* image's configuration (which includes the digests of layers used by
* the image).
*
* Note that this digest differs from the `RepoDigests` below, which
* holds digests of image manifests that reference the image.
*/
public function setId(?string $id): self
{
$this->initialized['id'] = true;
$this->id = $id;
return $this;
}
/**
* ID of the parent image.
*
* Depending on how the image was created, this field may be empty and
* is only set for images that were built/created locally. This field
* is empty if the image was pulled from an image registry.
*/
public function getParentId(): ?string
{
return $this->parentId;
}
/**
* ID of the parent image.
*
* Depending on how the image was created, this field may be empty and
* is only set for images that were built/created locally. This field
* is empty if the image was pulled from an image registry.
*/
public function setParentId(?string $parentId): self
{
$this->initialized['parentId'] = true;
$this->parentId = $parentId;
return $this;
}
/**
* List of image names/tags in the local image cache that reference this
* image.
*
* Multiple image tags can refer to the same image, and this list may be
* empty if no tags reference the image, in which case the image is
* "untagged", in which case it can still be referenced by its ID.
*
* @return list<string>|null
*/
public function getRepoTags(): ?array
{
return $this->repoTags;
}
/**
* List of image names/tags in the local image cache that reference this
* image.
*
* Multiple image tags can refer to the same image, and this list may be
* empty if no tags reference the image, in which case the image is
* "untagged", in which case it can still be referenced by its ID.
*
* @param list<string>|null $repoTags
*/
public function setRepoTags(?array $repoTags): self
{
$this->initialized['repoTags'] = true;
$this->repoTags = $repoTags;
return $this;
}
/**
* List of content-addressable digests of locally available image manifests
* that the image is referenced from. Multiple manifests can refer to the
* same image.
*
* These digests are usually only available if the image was either pulled
* from a registry, or if the image was pushed to a registry, which is when
* the manifest is generated and its digest calculated.
*
* @return list<string>|null
*/
public function getRepoDigests(): ?array
{
return $this->repoDigests;
}
/**
* List of content-addressable digests of locally available image manifests
* that the image is referenced from. Multiple manifests can refer to the
* same image.
*
* These digests are usually only available if the image was either pulled
* from a registry, or if the image was pushed to a registry, which is when
* the manifest is generated and its digest calculated.
*
* @param list<string>|null $repoDigests
*/
public function setRepoDigests(?array $repoDigests): self
{
$this->initialized['repoDigests'] = true;
$this->repoDigests = $repoDigests;
return $this;
}
/**
* Date and time at which the image was created as a Unix timestamp
* (number of seconds sinds EPOCH).
*/
public function getCreated(): ?int
{
return $this->created;
}
/**
* Date and time at which the image was created as a Unix timestamp
* (number of seconds sinds EPOCH).
*/
public function setCreated(?int $created): self
{
$this->initialized['created'] = true;
$this->created = $created;
return $this;
}
/**
* Total size of the image including all layers it is composed of.
*/
public function getSize(): ?int
{
return $this->size;
}
/**
* Total size of the image including all layers it is composed of.
*/
public function setSize(?int $size): self
{
$this->initialized['size'] = true;
$this->size = $size;
return $this;
}
/**
* Total size of image layers that are shared between this image and other
* images.
*
* This size is not calculated by default. `-1` indicates that the value
* has not been set / calculated.
*/
public function getSharedSize(): ?int
{
return $this->sharedSize;
}
/**
* Total size of image layers that are shared between this image and other
* images.
*
* This size is not calculated by default. `-1` indicates that the value
* has not been set / calculated.
*/
public function setSharedSize(?int $sharedSize): self
{
$this->initialized['sharedSize'] = true;
$this->sharedSize = $sharedSize;
return $this;
}
/**
* Total size of the image including all layers it is composed of.
*
* Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.
*/
public function getVirtualSize(): ?int
{
return $this->virtualSize;
}
/**
* Total size of the image including all layers it is composed of.
*
* Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.
*/
public function setVirtualSize(?int $virtualSize): self
{
$this->initialized['virtualSize'] = true;
$this->virtualSize = $virtualSize;
return $this;
}
/**
* User-defined key/value metadata.
*
* @return array<string, string>|null
*/
public function getLabels(): ?iterable
{
return $this->labels;
}
/**
* User-defined key/value metadata.
*
* @param array<string, string>|null $labels
*/
public function setLabels(?iterable $labels): self
{
$this->initialized['labels'] = true;
$this->labels = $labels;
return $this;
}
/**
* Number of containers using this image. Includes both stopped and running
* containers.
*
* This size is not calculated by default, and depends on which API endpoint
* is used. `-1` indicates that the value has not been set / calculated.
*/
public function getContainers(): ?int
{
return $this->containers;
}
/**
* Number of containers using this image. Includes both stopped and running
* containers.
*
* This size is not calculated by default, and depends on which API endpoint
* is used. `-1` indicates that the value has not been set / calculated.
*/
public function setContainers(?int $containers): self
{
$this->initialized['containers'] = true;
$this->containers = $containers;
return $this;
}
}
You can’t perform that action at this time.
