Skip to content

Commit 837271b

Browse files
Update generated code (#1952)
update generated code
1 parent d93e11c commit 837271b

File tree

6 files changed

+73
-3
lines changed

6 files changed

+73
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- AWS api-change: Rework regions configuration
8+
- AWS api-change: This release includes exception definition and documentation updates.
89

910
## 1.1.1
1011

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace AsyncAws\SsoOidc\Enum;
4+
5+
final class AccessDeniedExceptionReason
6+
{
7+
public const KMS_ACCESS_DENIED_EXCEPTION = 'KMS_AccessDeniedException';
8+
9+
public static function exists(string $value): bool
10+
{
11+
return isset([
12+
self::KMS_ACCESS_DENIED_EXCEPTION => true,
13+
][$value]);
14+
}
15+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace AsyncAws\SsoOidc\Enum;
4+
5+
final class InvalidRequestExceptionReason
6+
{
7+
public const KMS_DISABLED_EXCEPTION = 'KMS_DisabledException';
8+
public const KMS_INVALID_KEY_USAGE_EXCEPTION = 'KMS_InvalidKeyUsageException';
9+
public const KMS_INVALID_STATE_EXCEPTION = 'KMS_InvalidStateException';
10+
public const KMS_NOT_FOUND_EXCEPTION = 'KMS_NotFoundException';
11+
12+
public static function exists(string $value): bool
13+
{
14+
return isset([
15+
self::KMS_DISABLED_EXCEPTION => true,
16+
self::KMS_INVALID_KEY_USAGE_EXCEPTION => true,
17+
self::KMS_INVALID_STATE_EXCEPTION => true,
18+
self::KMS_NOT_FOUND_EXCEPTION => true,
19+
][$value]);
20+
}
21+
}

src/Exception/AccessDeniedException.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace AsyncAws\SsoOidc\Exception;
44

55
use AsyncAws\Core\Exception\Http\ClientException;
6+
use AsyncAws\SsoOidc\Enum\AccessDeniedExceptionReason;
67
use Symfony\Contracts\HttpClient\ResponseInterface;
78

89
/**
@@ -17,6 +18,13 @@ final class AccessDeniedException extends ClientException
1718
*/
1819
private $error;
1920

21+
/**
22+
* A string that uniquely identifies a reason for the error.
23+
*
24+
* @var AccessDeniedExceptionReason::*|null
25+
*/
26+
private $reason;
27+
2028
/**
2129
* Human-readable text providing additional information, used to assist the client developer in understanding the error
2230
* that occurred.
@@ -35,11 +43,20 @@ public function getError_description(): ?string
3543
return $this->error_description;
3644
}
3745

46+
/**
47+
* @return AccessDeniedExceptionReason::*|null
48+
*/
49+
public function getReason(): ?string
50+
{
51+
return $this->reason;
52+
}
53+
3854
protected function populateResult(ResponseInterface $response): void
3955
{
4056
$data = $response->toArray(false);
4157

4258
$this->error = isset($data['error']) ? (string) $data['error'] : null;
59+
$this->reason = isset($data['reason']) ? (string) $data['reason'] : null;
4360
$this->error_description = isset($data['error_description']) ? (string) $data['error_description'] : null;
4461
}
4562
}

src/Exception/InvalidRequestException.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace AsyncAws\SsoOidc\Exception;
44

55
use AsyncAws\Core\Exception\Http\ClientException;
6+
use AsyncAws\SsoOidc\Enum\InvalidRequestExceptionReason;
67
use Symfony\Contracts\HttpClient\ResponseInterface;
78

89
/**
@@ -18,6 +19,13 @@ final class InvalidRequestException extends ClientException
1819
*/
1920
private $error;
2021

22+
/**
23+
* A string that uniquely identifies a reason for the error.
24+
*
25+
* @var InvalidRequestExceptionReason::*|null
26+
*/
27+
private $reason;
28+
2129
/**
2230
* Human-readable text providing additional information, used to assist the client developer in understanding the error
2331
* that occurred.
@@ -36,11 +44,20 @@ public function getError_description(): ?string
3644
return $this->error_description;
3745
}
3846

47+
/**
48+
* @return InvalidRequestExceptionReason::*|null
49+
*/
50+
public function getReason(): ?string
51+
{
52+
return $this->reason;
53+
}
54+
3955
protected function populateResult(ResponseInterface $response): void
4056
{
4157
$data = $response->toArray(false);
4258

4359
$this->error = isset($data['error']) ? (string) $data['error'] : null;
60+
$this->reason = isset($data['reason']) ? (string) $data['reason'] : null;
4461
$this->error_description = isset($data['error_description']) ? (string) $data['error_description'] : null;
4562
}
4663
}

src/Input/CreateTokenRequest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ final class CreateTokenRequest extends Input
7474
private $refreshToken;
7575

7676
/**
77-
* The list of scopes for which authorization is requested. The access token that is issued is limited to the scopes
78-
* that are granted. If this value is not specified, IAM Identity Center authorizes all scopes that are configured for
79-
* the client during the call to RegisterClient.
77+
* The list of scopes for which authorization is requested. This parameter has no effect; the access token will always
78+
* include all scopes configured during client registration.
8079
*
8180
* @var string[]|null
8281
*/

0 commit comments

Comments
 (0)