Skip to content

Commit f55fc38

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 679dfdd commit f55fc38

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Changed
6+
7+
- Sort exception alphabetically.
8+
59
## 1.3.0
610

711
### Added

src/SchedulerClient.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,23 @@ class SchedulerClient extends AbstractApi
6262
* '@region'?: string|null,
6363
* }|CreateScheduleInput $input
6464
*
65-
* @throws ServiceQuotaExceededException
66-
* @throws ValidationException
67-
* @throws InternalServerException
6865
* @throws ConflictException
66+
* @throws InternalServerException
6967
* @throws ResourceNotFoundException
68+
* @throws ServiceQuotaExceededException
7069
* @throws ThrottlingException
70+
* @throws ValidationException
7171
*/
7272
public function createSchedule($input): CreateScheduleOutput
7373
{
7474
$input = CreateScheduleInput::create($input);
7575
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'CreateSchedule', 'region' => $input->getRegion(), 'exceptionMapping' => [
76-
'ServiceQuotaExceededException' => ServiceQuotaExceededException::class,
77-
'ValidationException' => ValidationException::class,
78-
'InternalServerException' => InternalServerException::class,
7976
'ConflictException' => ConflictException::class,
77+
'InternalServerException' => InternalServerException::class,
8078
'ResourceNotFoundException' => ResourceNotFoundException::class,
79+
'ServiceQuotaExceededException' => ServiceQuotaExceededException::class,
8180
'ThrottlingException' => ThrottlingException::class,
81+
'ValidationException' => ValidationException::class,
8282
]]));
8383

8484
return new CreateScheduleOutput($response);
@@ -97,21 +97,21 @@ public function createSchedule($input): CreateScheduleOutput
9797
* '@region'?: string|null,
9898
* }|CreateScheduleGroupInput $input
9999
*
100-
* @throws ServiceQuotaExceededException
101-
* @throws ValidationException
102-
* @throws InternalServerException
103100
* @throws ConflictException
101+
* @throws InternalServerException
102+
* @throws ServiceQuotaExceededException
104103
* @throws ThrottlingException
104+
* @throws ValidationException
105105
*/
106106
public function createScheduleGroup($input): CreateScheduleGroupOutput
107107
{
108108
$input = CreateScheduleGroupInput::create($input);
109109
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'CreateScheduleGroup', 'region' => $input->getRegion(), 'exceptionMapping' => [
110-
'ServiceQuotaExceededException' => ServiceQuotaExceededException::class,
111-
'ValidationException' => ValidationException::class,
112-
'InternalServerException' => InternalServerException::class,
113110
'ConflictException' => ConflictException::class,
111+
'InternalServerException' => InternalServerException::class,
112+
'ServiceQuotaExceededException' => ServiceQuotaExceededException::class,
114113
'ThrottlingException' => ThrottlingException::class,
114+
'ValidationException' => ValidationException::class,
115115
]]));
116116

117117
return new CreateScheduleGroupOutput($response);
@@ -130,21 +130,21 @@ public function createScheduleGroup($input): CreateScheduleGroupOutput
130130
* '@region'?: string|null,
131131
* }|DeleteScheduleInput $input
132132
*
133-
* @throws ValidationException
134-
* @throws InternalServerException
135133
* @throws ConflictException
134+
* @throws InternalServerException
136135
* @throws ResourceNotFoundException
137136
* @throws ThrottlingException
137+
* @throws ValidationException
138138
*/
139139
public function deleteSchedule($input): DeleteScheduleOutput
140140
{
141141
$input = DeleteScheduleInput::create($input);
142142
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'DeleteSchedule', 'region' => $input->getRegion(), 'exceptionMapping' => [
143-
'ValidationException' => ValidationException::class,
144-
'InternalServerException' => InternalServerException::class,
145143
'ConflictException' => ConflictException::class,
144+
'InternalServerException' => InternalServerException::class,
146145
'ResourceNotFoundException' => ResourceNotFoundException::class,
147146
'ThrottlingException' => ThrottlingException::class,
147+
'ValidationException' => ValidationException::class,
148148
]]));
149149

150150
return new DeleteScheduleOutput($response);
@@ -168,21 +168,21 @@ public function deleteSchedule($input): DeleteScheduleOutput
168168
* '@region'?: string|null,
169169
* }|DeleteScheduleGroupInput $input
170170
*
171-
* @throws ValidationException
172-
* @throws InternalServerException
173171
* @throws ConflictException
172+
* @throws InternalServerException
174173
* @throws ResourceNotFoundException
175174
* @throws ThrottlingException
175+
* @throws ValidationException
176176
*/
177177
public function deleteScheduleGroup($input): DeleteScheduleGroupOutput
178178
{
179179
$input = DeleteScheduleGroupInput::create($input);
180180
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'DeleteScheduleGroup', 'region' => $input->getRegion(), 'exceptionMapping' => [
181-
'ValidationException' => ValidationException::class,
182-
'InternalServerException' => InternalServerException::class,
183181
'ConflictException' => ConflictException::class,
182+
'InternalServerException' => InternalServerException::class,
184183
'ResourceNotFoundException' => ResourceNotFoundException::class,
185184
'ThrottlingException' => ThrottlingException::class,
185+
'ValidationException' => ValidationException::class,
186186
]]));
187187

188188
return new DeleteScheduleGroupOutput($response);
@@ -200,19 +200,19 @@ public function deleteScheduleGroup($input): DeleteScheduleGroupOutput
200200
* '@region'?: string|null,
201201
* }|GetScheduleInput $input
202202
*
203-
* @throws ValidationException
204203
* @throws InternalServerException
205204
* @throws ResourceNotFoundException
206205
* @throws ThrottlingException
206+
* @throws ValidationException
207207
*/
208208
public function getSchedule($input): GetScheduleOutput
209209
{
210210
$input = GetScheduleInput::create($input);
211211
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetSchedule', 'region' => $input->getRegion(), 'exceptionMapping' => [
212-
'ValidationException' => ValidationException::class,
213212
'InternalServerException' => InternalServerException::class,
214213
'ResourceNotFoundException' => ResourceNotFoundException::class,
215214
'ThrottlingException' => ThrottlingException::class,
215+
'ValidationException' => ValidationException::class,
216216
]]));
217217

218218
return new GetScheduleOutput($response);
@@ -229,19 +229,19 @@ public function getSchedule($input): GetScheduleOutput
229229
* '@region'?: string|null,
230230
* }|GetScheduleGroupInput $input
231231
*
232-
* @throws ValidationException
233232
* @throws InternalServerException
234233
* @throws ResourceNotFoundException
235234
* @throws ThrottlingException
235+
* @throws ValidationException
236236
*/
237237
public function getScheduleGroup($input): GetScheduleGroupOutput
238238
{
239239
$input = GetScheduleGroupInput::create($input);
240240
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetScheduleGroup', 'region' => $input->getRegion(), 'exceptionMapping' => [
241-
'ValidationException' => ValidationException::class,
242241
'InternalServerException' => InternalServerException::class,
243242
'ResourceNotFoundException' => ResourceNotFoundException::class,
244243
'ThrottlingException' => ThrottlingException::class,
244+
'ValidationException' => ValidationException::class,
245245
]]));
246246

247247
return new GetScheduleGroupOutput($response);
@@ -260,17 +260,17 @@ public function getScheduleGroup($input): GetScheduleGroupOutput
260260
* '@region'?: string|null,
261261
* }|ListScheduleGroupsInput $input
262262
*
263-
* @throws ValidationException
264263
* @throws InternalServerException
265264
* @throws ThrottlingException
265+
* @throws ValidationException
266266
*/
267267
public function listScheduleGroups($input = []): ListScheduleGroupsOutput
268268
{
269269
$input = ListScheduleGroupsInput::create($input);
270270
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'ListScheduleGroups', 'region' => $input->getRegion(), 'exceptionMapping' => [
271-
'ValidationException' => ValidationException::class,
272271
'InternalServerException' => InternalServerException::class,
273272
'ThrottlingException' => ThrottlingException::class,
273+
'ValidationException' => ValidationException::class,
274274
]]));
275275

276276
return new ListScheduleGroupsOutput($response, $this, $input);
@@ -291,19 +291,19 @@ public function listScheduleGroups($input = []): ListScheduleGroupsOutput
291291
* '@region'?: string|null,
292292
* }|ListSchedulesInput $input
293293
*
294-
* @throws ValidationException
295294
* @throws InternalServerException
296295
* @throws ResourceNotFoundException
297296
* @throws ThrottlingException
297+
* @throws ValidationException
298298
*/
299299
public function listSchedules($input = []): ListSchedulesOutput
300300
{
301301
$input = ListSchedulesInput::create($input);
302302
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'ListSchedules', 'region' => $input->getRegion(), 'exceptionMapping' => [
303-
'ValidationException' => ValidationException::class,
304303
'InternalServerException' => InternalServerException::class,
305304
'ResourceNotFoundException' => ResourceNotFoundException::class,
306305
'ThrottlingException' => ThrottlingException::class,
306+
'ValidationException' => ValidationException::class,
307307
]]));
308308

309309
return new ListSchedulesOutput($response, $this, $input);
@@ -337,21 +337,21 @@ public function listSchedules($input = []): ListSchedulesOutput
337337
* '@region'?: string|null,
338338
* }|UpdateScheduleInput $input
339339
*
340-
* @throws ValidationException
341-
* @throws InternalServerException
342340
* @throws ConflictException
341+
* @throws InternalServerException
343342
* @throws ResourceNotFoundException
344343
* @throws ThrottlingException
344+
* @throws ValidationException
345345
*/
346346
public function updateSchedule($input): UpdateScheduleOutput
347347
{
348348
$input = UpdateScheduleInput::create($input);
349349
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'UpdateSchedule', 'region' => $input->getRegion(), 'exceptionMapping' => [
350-
'ValidationException' => ValidationException::class,
351-
'InternalServerException' => InternalServerException::class,
352350
'ConflictException' => ConflictException::class,
351+
'InternalServerException' => InternalServerException::class,
353352
'ResourceNotFoundException' => ResourceNotFoundException::class,
354353
'ThrottlingException' => ThrottlingException::class,
354+
'ValidationException' => ValidationException::class,
355355
]]));
356356

357357
return new UpdateScheduleOutput($response);

0 commit comments

Comments
 (0)