-
-
Couldn't load subscription status.
- Fork 145
Update generated code #1871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update generated code #1871
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,10 @@ | |
|
|
||
| ## NOT RELEASED | ||
|
|
||
| ### Added | ||
|
|
||
| - AWS api-change: TODO | ||
|
|
||
| ## 3.1.1 | ||
|
|
||
| ### Changed | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |
| }, | ||
| "extra": { | ||
| "branch-alias": { | ||
| "dev-master": "3.1-dev" | ||
| "dev-master": "3.2-dev" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ | |
| }, | ||
| "extra": { | ||
| "branch-alias": { | ||
| "dev-master": "2.8-dev" | ||
| "dev-master": "2.9-dev" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ | |
| }, | ||
| "extra": { | ||
| "branch-alias": { | ||
| "dev-master": "1.11-dev" | ||
| "dev-master": "1.12-dev" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?php | ||
|
|
||
| namespace AsyncAws\Ses\Enum; | ||
|
|
||
| final class AttachmentContentDisposition | ||
| { | ||
| public const ATTACHMENT = 'ATTACHMENT'; | ||
| public const INLINE = 'INLINE'; | ||
|
|
||
| public static function exists(string $value): bool | ||
| { | ||
| return isset([ | ||
| self::ATTACHMENT => true, | ||
| self::INLINE => true, | ||
| ][$value]); | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/Service/Ses/src/Enum/AttachmentContentTransferEncoding.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?php | ||
|
|
||
| namespace AsyncAws\Ses\Enum; | ||
|
|
||
| final class AttachmentContentTransferEncoding | ||
| { | ||
| public const BASE64 = 'BASE64'; | ||
| public const QUOTED_PRINTABLE = 'QUOTED_PRINTABLE'; | ||
| public const SEVEN_BIT = 'SEVEN_BIT'; | ||
|
|
||
| public static function exists(string $value): bool | ||
| { | ||
| return isset([ | ||
| self::BASE64 => true, | ||
| self::QUOTED_PRINTABLE => true, | ||
| self::SEVEN_BIT => true, | ||
| ][$value]); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,192 @@ | ||
| <?php | ||
|
|
||
| namespace AsyncAws\Ses\ValueObject; | ||
|
|
||
| use AsyncAws\Core\Exception\InvalidArgument; | ||
| use AsyncAws\Ses\Enum\AttachmentContentDisposition; | ||
| use AsyncAws\Ses\Enum\AttachmentContentTransferEncoding; | ||
|
|
||
| /** | ||
| * Contains metadata and attachment raw content. | ||
| */ | ||
| final class Attachment | ||
| { | ||
| /** | ||
| * The raw data of the attachment. It needs to be base64-encoded if you are accessing Amazon SES directly through the | ||
| * HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services SDK, the SDK takes care of the base | ||
| * 64-encoding for you. | ||
| * | ||
| * @var string | ||
| */ | ||
| private $rawContent; | ||
|
|
||
| /** | ||
| * A standard descriptor indicating how the attachment should be rendered in the email. Supported values: `ATTACHMENT` | ||
| * or `INLINE`. | ||
| * | ||
| * @var AttachmentContentDisposition::*|null | ||
| */ | ||
| private $contentDisposition; | ||
|
|
||
| /** | ||
| * The file name for the attachment as it will appear in the email. Amazon SES restricts certain file extensions. To | ||
| * ensure attachments are accepted, check the Unsupported attachment types [^1] in the Amazon SES Developer Guide. | ||
| * | ||
| * [^1]: https://docs.aws.amazon.com/ses/latest/dg/mime-types.html | ||
| * | ||
| * @var string | ||
| */ | ||
| private $fileName; | ||
|
|
||
| /** | ||
| * A brief description of the attachment content. | ||
| * | ||
| * @var string|null | ||
| */ | ||
| private $contentDescription; | ||
|
|
||
| /** | ||
| * Unique identifier for the attachment, used for referencing attachments with INLINE disposition in HTML content. | ||
| * | ||
| * @var string|null | ||
| */ | ||
| private $contentId; | ||
|
|
||
| /** | ||
| * Specifies how the attachment is encoded. Supported values: `BASE64`, `QUOTED_PRINTABLE`, `SEVEN_BIT`. | ||
| * | ||
| * @var AttachmentContentTransferEncoding::*|null | ||
| */ | ||
| private $contentTransferEncoding; | ||
|
|
||
| /** | ||
| * The MIME type of the attachment. | ||
| * | ||
| * > Example: `application/pdf`, `image/jpeg` | ||
| * | ||
| * @var string|null | ||
| */ | ||
| private $contentType; | ||
|
|
||
| /** | ||
| * @param array{ | ||
| * RawContent: string, | ||
| * ContentDisposition?: null|AttachmentContentDisposition::*, | ||
| * FileName: string, | ||
| * ContentDescription?: null|string, | ||
| * ContentId?: null|string, | ||
| * ContentTransferEncoding?: null|AttachmentContentTransferEncoding::*, | ||
| * ContentType?: null|string, | ||
| * } $input | ||
| */ | ||
| public function __construct(array $input) | ||
| { | ||
| $this->rawContent = $input['RawContent'] ?? $this->throwException(new InvalidArgument('Missing required field "RawContent".')); | ||
| $this->contentDisposition = $input['ContentDisposition'] ?? null; | ||
| $this->fileName = $input['FileName'] ?? $this->throwException(new InvalidArgument('Missing required field "FileName".')); | ||
| $this->contentDescription = $input['ContentDescription'] ?? null; | ||
| $this->contentId = $input['ContentId'] ?? null; | ||
| $this->contentTransferEncoding = $input['ContentTransferEncoding'] ?? null; | ||
| $this->contentType = $input['ContentType'] ?? null; | ||
| } | ||
|
|
||
| /** | ||
| * @param array{ | ||
| * RawContent: string, | ||
| * ContentDisposition?: null|AttachmentContentDisposition::*, | ||
| * FileName: string, | ||
| * ContentDescription?: null|string, | ||
| * ContentId?: null|string, | ||
| * ContentTransferEncoding?: null|AttachmentContentTransferEncoding::*, | ||
| * ContentType?: null|string, | ||
| * }|Attachment $input | ||
| */ | ||
| public static function create($input): self | ||
| { | ||
| return $input instanceof self ? $input : new self($input); | ||
| } | ||
|
|
||
| public function getContentDescription(): ?string | ||
| { | ||
| return $this->contentDescription; | ||
| } | ||
|
|
||
| /** | ||
| * @return AttachmentContentDisposition::*|null | ||
| */ | ||
| public function getContentDisposition(): ?string | ||
| { | ||
| return $this->contentDisposition; | ||
| } | ||
|
|
||
| public function getContentId(): ?string | ||
| { | ||
| return $this->contentId; | ||
| } | ||
|
|
||
| /** | ||
| * @return AttachmentContentTransferEncoding::*|null | ||
| */ | ||
| public function getContentTransferEncoding(): ?string | ||
| { | ||
| return $this->contentTransferEncoding; | ||
| } | ||
|
|
||
| public function getContentType(): ?string | ||
| { | ||
| return $this->contentType; | ||
| } | ||
|
|
||
| public function getFileName(): string | ||
| { | ||
| return $this->fileName; | ||
| } | ||
|
|
||
| public function getRawContent(): string | ||
| { | ||
| return $this->rawContent; | ||
| } | ||
|
|
||
| /** | ||
| * @internal | ||
| */ | ||
| public function requestBody(): array | ||
| { | ||
| $payload = []; | ||
| $v = $this->rawContent; | ||
| $payload['RawContent'] = base64_encode($v); | ||
| if (null !== $v = $this->contentDisposition) { | ||
| if (!AttachmentContentDisposition::exists($v)) { | ||
| throw new InvalidArgument(\sprintf('Invalid parameter "ContentDisposition" for "%s". The value "%s" is not a valid "AttachmentContentDisposition".', __CLASS__, $v)); | ||
| } | ||
| $payload['ContentDisposition'] = $v; | ||
| } | ||
| $v = $this->fileName; | ||
| $payload['FileName'] = $v; | ||
| if (null !== $v = $this->contentDescription) { | ||
| $payload['ContentDescription'] = $v; | ||
| } | ||
| if (null !== $v = $this->contentId) { | ||
| $payload['ContentId'] = $v; | ||
| } | ||
| if (null !== $v = $this->contentTransferEncoding) { | ||
| if (!AttachmentContentTransferEncoding::exists($v)) { | ||
| throw new InvalidArgument(\sprintf('Invalid parameter "ContentTransferEncoding" for "%s". The value "%s" is not a valid "AttachmentContentTransferEncoding".', __CLASS__, $v)); | ||
| } | ||
| $payload['ContentTransferEncoding'] = $v; | ||
| } | ||
| if (null !== $v = $this->contentType) { | ||
| $payload['ContentType'] = $v; | ||
| } | ||
|
|
||
| return $payload; | ||
| } | ||
|
|
||
| /** | ||
| * @return never | ||
| */ | ||
| private function throwException(\Throwable $exception) | ||
| { | ||
| throw $exception; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.