-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathParams.php
More file actions
227 lines (202 loc) · 6.56 KB
/
Params.php
File metadata and controls
227 lines (202 loc) · 6.56 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
<?php
declare(strict_types=1);
namespace OpenStack\Images\v2;
use OpenStack\Common\Api\AbstractParams;
use Psr\Http\Message\StreamInterface;
class Params extends AbstractParams
{
public function imageName(): array
{
return array_merge($this->name('image'), [
'description' => 'Name for the image. The name of an image is not unique to an Image service node. The '.
'API cannot expect users to know the names of images owned by others.',
'required' => true,
]);
}
public function visibility(): array
{
return [
'location' => self::JSON,
'type' => self::STRING_TYPE,
'description' => 'Image visibility. Public or private. Default is public.',
'enum' => ['private', 'public', 'community', 'shared'],
];
}
public function tags(): array
{
return [
'location' => self::JSON,
'type' => self::ARRAY_TYPE,
'description' => 'Image tags',
'items' => ['type' => self::STRING_TYPE],
];
}
public function containerFormat(): array
{
return [
'location' => self::JSON,
'type' => self::STRING_TYPE,
'sentAs' => 'container_format',
'description' => 'Format of the container. A valid value is ami, ari, aki, bare, ovf, or ova.',
'enum' => ['ami', 'ari', 'aki', 'bare', 'ovf', 'ova'],
];
}
public function diskFormat(): array
{
return [
'location' => self::JSON,
'type' => self::STRING_TYPE,
'sentAs' => 'disk_format',
'description' => 'Format of the container. A valid value is ami, ari, aki, bare, ovf, or ova.',
'enum' => ['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2', 'vdi', 'iso'],
];
}
public function minDisk(): array
{
return [
'location' => self::JSON,
'type' => self::INT_TYPE,
'sentAs' => 'min_disk',
'description' => 'Amount of disk space in GB that is required to boot the image.',
];
}
public function minRam(): array
{
return [
'location' => self::JSON,
'type' => self::INT_TYPE,
'sentAs' => 'min_ram',
'description' => 'Amount of RAM in GB that is required to boot the image.',
];
}
public function protectedParam(): array
{
return [
'location' => self::JSON,
'type' => self::BOOL_TYPE,
'description' => 'If true, image is not deletable.',
];
}
public function queryName(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'description' => 'Shows only images with this name. A valid value is the name of the image as a string.',
];
}
public function queryVisibility(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'description' => 'Shows only images with this image visibility value or values.',
'enum' => ['public', 'private', 'shared'],
];
}
public function queryMemberStatus(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'sentAs' => 'member_status',
'description' => 'Shows only images with this member status.',
'enum' => ['accepted', 'pending', 'rejected', 'all'],
];
}
public function queryOwner(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'description' => 'Shows only images that are shared with this owner.',
];
}
public function queryStatus(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'description' => 'Shows only images with this image status.',
'enum' => ['queued', 'saving', 'active', 'killed', 'deleted', 'pending_delete'],
];
}
public function querySizeMin(): array
{
return [
'location' => self::QUERY,
'type' => self::INT_TYPE,
'sentAs' => 'size_min',
'description' => 'Shows only images with this minimum image size.',
];
}
public function querySizeMax(): array
{
return [
'location' => self::QUERY,
'type' => self::INT_TYPE,
'sentAs' => 'size_max',
'description' => 'Shows only images with this maximum image size.',
];
}
public function queryTag(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'description' => 'Image tag.',
];
}
public function sort(): array
{
return [
'location' => self::QUERY,
'type' => self::STRING_TYPE,
'description' => 'Sorts the response by one or more attribute and sort direction combinations. You can ' .
'also set multiple sort keys and directions. Default direction is desc.'
];
}
public function contentType(): array
{
return [
'location' => self::HEADER,
'type' => self::STRING_TYPE,
'sentAs' => 'Content-Type',
];
}
public function patchDoc(): array
{
return [
'location' => self::RAW,
'type' => self::STRING_TYPE,
'required' => true,
'documented' => false,
];
}
public function data(): array
{
return [
'location' => self::RAW,
'type' => StreamInterface::class,
'required' => true,
'documented' => false,
];
}
public function memberId(): array
{
return [
'location' => self::JSON,
'sentAs' => 'member',
'type' => self::STRING_TYPE,
'documented' => false,
];
}
public function status(): array
{
return [
'location' => self::JSON,
'type' => self::STRING_TYPE,
'enum' => ['pending', 'accepted', 'rejected'],
];
}
}